Skip to content

Commit

Permalink
Merge pull request #32 from Alirezaja1384/build-deployment
Browse files Browse the repository at this point in the history
chore(build workflow): deployment_check step added
  • Loading branch information
Alirezaja1384 authored Sep 8, 2024
2 parents 86eaaee + b36780b commit efbdc5c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,21 @@ jobs:
runs-on: ubuntu-latest
needs: [build, tag]
steps:
- name: Check if deployment PAT is set
id: deployment_check
run: |
if [ -z "${{ secrets.DEPLOYMENT_PAT }}" ]; then
echo "DEPLOYMENT_PAT is not set. Skipping deployment."
echo "deployment_enabled=false" >> $GITHUB_OUTPUT
exit 0
else
echo "deployment_enabled=true" >> $GITHUB_OUTPUT
echo "deployment_enabled=true" >> $GITHUB_OUTPUT
fi
- name: Update deployment
uses: actions/github-script@v7
if: steps.deployment_check.outputs.deployment_enabled == 'true'
with:
github-token: ${{ secrets.DEPLOYMENT_PAT }}
script: |
Expand Down Expand Up @@ -115,4 +128,4 @@ jobs:
}
});
console.log('Workflow dispatch triggered successfully.');
console.log('Workflow dispatch triggered successfully.');

0 comments on commit efbdc5c

Please sign in to comment.