Skip to content

Commit b5bc374

Browse files
committed
ci: fix job conditionals on publish and publish-containers
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
1 parent d49c07e commit b5bc374

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/build-workflow.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ jobs:
232232
# before publishing the virtual packages (which are architecture agnostic)
233233
publish-containers:
234234
name: Publish Containers
235-
if: github.event_name != 'pull_request_target'
235+
if: |
236+
always() &&
237+
github.event_name != 'pull_request_target' &&
238+
(needs.test.result == 'success' || needs.test.result == 'skipped')
236239
runs-on: ubuntu-20.04
237240
needs: [test]
238241
env:
@@ -302,7 +305,10 @@ jobs:
302305
# before publishing the virtual packages (which are architecture agnostic)
303306
publish-virtual-packages:
304307
name: Publish Virtual Packages
305-
if: github.event_name != 'pull_request_target'
308+
if: |
309+
always() &&
310+
github.event_name != 'pull_request_target' &&
311+
needs.publish.result == 'success'
306312
runs-on: ubuntu-20.04
307313
needs: [publish]
308314
steps:

0 commit comments

Comments
 (0)