Skip to content

Commit

Permalink
fix(gh_action): Prevent workflow from triggering unless previous work…
Browse files Browse the repository at this point in the history
…flow succeeds (#21579)

* fix: add conditional based on trigger success

* chore: update trigger check

* fix: add syncronize to trigger list

* chore: debug

* chore: remove debugging

* fix: address feedback

* fix: remove trailing space
  • Loading branch information
devindford authored Oct 22, 2024
1 parent 5d8736f commit 4a44e41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build_preview_sites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
deploy_vector_preview_site:
if: ${{ github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.head_branch, 'website') }}
uses: ./.github/workflows/create_preview_sites.yml
with:
APP_ID: "d1a7j77663uxsc"
Expand All @@ -18,6 +19,7 @@ jobs:
ENDPOINT: ${{ secrets.BUILDER_ENDPOINT }}

deploy_rust_doc_preview_site:
if: ${{ github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.head_branch, 'website') }}
uses: ./.github/workflows/create_preview_sites.yml
with:
APP_ID: "d1hoyoksbulg25"
Expand All @@ -28,6 +30,7 @@ jobs:
ENDPOINT: ${{ secrets.BUILDER_ENDPOINT }}

deploy_vrl_playground_preview_site:
if: ${{ github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.head_branch, 'website') }}
uses: ./.github/workflows/create_preview_sites.yml
with:
APP_ID: "d2lr4eds605rpz"
Expand All @@ -36,4 +39,3 @@ jobs:
REQUEST_TOKEN: ${{ secrets.REQUEST_TOKEN }}
REQUEST_MESSAGE: ${{ secrets.REQUEST_MESSAGE }}
ENDPOINT: ${{ secrets.BUILDER_ENDPOINT }}

2 changes: 1 addition & 1 deletion .github/workflows/preview_site_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Call Build Preview

on:
pull_request:
types: [opened, reopened]
types: [opened, reopened, synchronize]

jobs:
approval_check:
Expand Down

0 comments on commit 4a44e41

Please sign in to comment.