Skip to content

Commit

Permalink
ci: Put environment secret variable on step level instead of job level
Browse files Browse the repository at this point in the history
  • Loading branch information
redmushie committed Oct 6, 2023
1 parent 3b394be commit 81efe68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ jobs:
runs-on: ubuntu-latest
needs: containerize
if: ${{ github.ref_type == 'branch' && github.ref_protected && github.event_name != 'pull_request' }}
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}

steps:
- name: Call deployment webhook
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run: |
curl -X HEAD -d "" ${{ env.WEBHOOK_URL }}
curl -X HEAD -d "" $WEBHOOK_URL
6 changes: 3 additions & 3 deletions .github/workflows/ci-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ jobs:
runs-on: ubuntu-latest
needs: containerize
if: ${{ github.ref_type == 'branch' && github.ref_protected && github.event_name != 'pull_request' }}
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}

steps:
- name: Call deployment webhook
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run: |
curl -X HEAD -d "" ${{ env.WEBHOOK_URL }}
curl -X HEAD -d "" $WEBHOOK_URL

0 comments on commit 81efe68

Please sign in to comment.