Skip to content

Commit cd32718

Browse files
committed
Change main CI workflow, use workflow_run to trigger "stackhpc", "extra", and "trivyscan" workflows.
Expecting this to allow quicker re-runs of failed workflows where we currently have to wait until the CI has finished before we can re-run a failure.
1 parent c12ec99 commit cd32718

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

.github/workflows/extra.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66

77
name: Test extra build
88
on:
9-
workflow_call:
109
workflow_dispatch:
10+
workflow_run:
11+
workflows: ["extra"]
12+
types:
13+
- completed
1114

1215
permissions:
1316
contents: read

.github/workflows/main.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,23 +127,29 @@ jobs:
127127
needs: files_changed
128128
if: |
129129
needs.files_changed.outputs.stackhpc == 'true'
130-
uses: ./.github/workflows/stackhpc.yml
131-
secrets: inherit
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
132134

133135
extra:
134136
name: Test extra build
135137
needs: files_changed
136138
if: |
137139
github.event_name != 'pull_request' && needs.files_changed.outputs.extra_on_push == 'true' ||
138140
github.event_name == 'pull_request' && needs.files_changed.outputs.extra_on_pull_request == 'true'
139-
uses: ./.github/workflows/extra.yml
140-
secrets: inherit
141+
runs-on: ubuntu-latest
142+
steps:
143+
# No-op job to trigger workflow 'extra.yml' via workflow_run
144+
- uses: mattdesl/no-op@32ec85ff176f761f607087006bda993440da5fe4
141145

142146
trivyscan:
143147
name: Trivy scan image for vulnerabilities
144148
needs: files_changed
145149
if: |
146150
github.event_name == 'pull_request' &&
147151
needs.files_changed.outputs.trivyscan == 'true'
148-
uses: ./.github/workflows/trivyscan.yml
149-
secrets: inherit
152+
runs-on: ubuntu-latest
153+
steps:
154+
# No-op job to trigger workflow 'trivyscan.yml' via workflow_run
155+
- uses: mattdesl/no-op@32ec85ff176f761f607087006bda993440da5fe4

.github/workflows/stackhpc.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66

77
name: Test deployment and reimage on OpenStack
88
on:
9-
workflow_call:
109
workflow_dispatch:
10+
workflow_run:
11+
workflows: ["stackhpc"]
12+
types:
13+
- completed
1114

1215
permissions:
1316
contents: read

.github/workflows/trivyscan.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66

77
name: Trivy scan image for vulnerabilities
88
on:
9-
workflow_call:
109
workflow_dispatch:
10+
workflow_run:
11+
workflows: ["trivyscan"]
12+
types:
13+
- completed
1114

1215
permissions:
1316
contents: read

0 commit comments

Comments
 (0)