Skip to content

Commit

Permalink
Moved the skip command to an env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
benji-glitsos-ga committed Mar 18, 2024
1 parent cc2363e commit 8c6691a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy-pr-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
PR_PREVIEW_SUBDOMAIN: pr-${{github.event.pull_request.number}}-preview
PR_PREVIEW_DEPLOY_LOG_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
PR_PREVIEW_BUCKET: s3://khpreview.dea.ga.gov.au
PR_PREVIEW_SKIP_COMMAND: "[no preview]"

permissions:
id-token: write # For requesting the JWT used by OIDC Authentication
Expand All @@ -20,9 +21,9 @@ jobs:
pr-preview:
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, '[skip preview]') &&
!contains(github.event.pull_request.title, '[skip preview]') &&
!contains(github.event.pull_request.body, '[skip preview]')
!contains(github.event.head_commit.message, '${{ env.PR_PREVIEW_SKIP_COMMAND }}') &&
!contains(github.event.pull_request.title, '${{ env.PR_PREVIEW_SKIP_COMMAND }}') &&
!contains(github.event.pull_request.body, '${{ env.PR_PREVIEW_SKIP_COMMAND }}')
strategy:
matrix:
Expand Down

0 comments on commit 8c6691a

Please sign in to comment.