Skip to content

Commit

Permalink
⚙️ config(ci): Run ci:test:deploy on workflow_run trigger.
Browse files Browse the repository at this point in the history
Instead of independently. This commit just adds the trigger. Removing
the independent running of the workflow will be done once tested on the
default branch.
  • Loading branch information
make-github-pseudonymous-again committed May 14, 2024
1 parent 922b7f6 commit 1039357
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci:test:deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- main
pull_request:
merge_group:
workflow_run:
workflows:
- ci:build:image
types:
- completed

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -28,7 +33,15 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Fail job if triggering workflow did not succeed
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success'
uses: actions/github-script@v7
with:
script: |
core.setFailed('ci:build:image did not succeed')
- name: Wait for image build workflow to succeed
if: github.event_name != 'workflow_run'
uses: ArcticLampyrid/action-wait-for-workflow@v1.2.0
with:
workflow: ci:build:image.yml
Expand Down

0 comments on commit 1039357

Please sign in to comment.