Skip to content

Commit 8ba0913

Browse files
committed
Incorporate intermediate "trigger named" workflows as workflow_run can only trigger on the workflow name
1 parent eb9a804 commit 8ba0913

File tree

7 files changed

+71
-9
lines changed

7 files changed

+71
-9
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Trigger - Test extra build
3+
4+
on: # yamllint disable-line rule:truthy
5+
workflow_call:
6+
7+
permissions:
8+
contents: read
9+
packages: read
10+
# To report GitHub Actions status checks
11+
statuses: write
12+
13+
jobs:
14+
extra:
15+
runs-on: ubuntu-latest
16+
steps:
17+
# No-op job to trigger workflow 'extra.yml' via workflow_run
18+
- uses: jakejarvis/wait-action@master
19+
with:
20+
time: '1s'

.github/workflows/extra.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: Test extra build
88
on:
99
workflow_dispatch:
1010
workflow_run:
11-
workflows: ["extra"]
11+
workflows: ["Trigger - Test extra build"]
1212
types:
1313
- completed
1414

.github/workflows/main.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,7 @@ jobs:
127127
needs: files_changed
128128
if: |
129129
needs.files_changed.outputs.stackhpc == 'true'
130-
runs-on: ubuntu-latest
131-
steps:
132-
# No-op job to trigger workflow 'stackhpc.yml' via workflow_run
133-
- uses: mattdesl/no-op@32ec85ff176f761f607087006bda993440da5fe4
130+
uses: ./.github/workflows/stackhpc-trigger.yml
134131

135132
extra:
136133
name: Test extra build
@@ -141,7 +138,9 @@ jobs:
141138
runs-on: ubuntu-latest
142139
steps:
143140
# No-op job to trigger workflow 'extra.yml' via workflow_run
144-
- uses: mattdesl/no-op@32ec85ff176f761f607087006bda993440da5fe4
141+
- uses: jakejarvis/wait-action@master
142+
with:
143+
time: '1s'
145144

146145
trivyscan:
147146
name: Trivy scan image for vulnerabilities
@@ -152,4 +151,7 @@ jobs:
152151
runs-on: ubuntu-latest
153152
steps:
154153
# No-op job to trigger workflow 'trivyscan.yml' via workflow_run
155-
- uses: mattdesl/no-op@32ec85ff176f761f607087006bda993440da5fe4
154+
- uses: jakejarvis/wait-action@master
155+
with:
156+
time: '1s'
157+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Trigger - Test deployment and reimage on OpenStack
3+
4+
on: # yamllint disable-line rule:truthy
5+
workflow_call:
6+
7+
permissions:
8+
contents: read
9+
packages: read
10+
# To report GitHub Actions status checks
11+
statuses: write
12+
13+
jobs:
14+
stackhpc:
15+
runs-on: ubuntu-latest
16+
steps:
17+
# No-op job to trigger workflow 'stackhpc.yml' via workflow_run
18+
- uses: jakejarvis/wait-action@master
19+
with:
20+
time: '1s'

.github/workflows/stackhpc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: Test deployment and reimage on OpenStack
88
on:
99
workflow_dispatch:
1010
workflow_run:
11-
workflows: ["stackhpc"]
11+
workflows: ["Trigger - Test deployment and reimage on OpenStack"]
1212
types:
1313
- completed
1414

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Trigger - Trivy scan image for vulnerabilities
3+
4+
on: # yamllint disable-line rule:truthy
5+
workflow_call:
6+
7+
permissions:
8+
contents: read
9+
packages: read
10+
# To report GitHub Actions status checks
11+
statuses: write
12+
13+
jobs:
14+
trivyscan:
15+
runs-on: ubuntu-latest
16+
steps:
17+
# No-op job to trigger workflow 'trivyscan.yml' via workflow_run
18+
- uses: jakejarvis/wait-action@master
19+
with:
20+
time: '1s'

.github/workflows/trivyscan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: Trivy scan image for vulnerabilities
88
on:
99
workflow_dispatch:
1010
workflow_run:
11-
workflows: ["trivyscan"]
11+
workflows: ["Trigger - Trivy scan image for vulnerabilities"]
1212
types:
1313
- completed
1414

0 commit comments

Comments
 (0)