Skip to content

Commit f8e15cd

Browse files
committed
Add publish input to _container.yml
1 parent 78fa020 commit f8e15cd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/_container.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
on:
22
workflow_call:
3+
inputs:
4+
publish:
5+
type: boolean
6+
description: If true, publishes docs to gh-pages
37

48
jobs:
59
build:
@@ -47,7 +51,7 @@ jobs:
4751
type=raw,value=latest
4852
4953
- name: Push cached image to container registry
50-
if: needs.test.result && github.ref_type == 'tag'
54+
if: inputs.publish && github.ref_type == 'tag'
5155
uses: docker/build-push-action@v6
5256
env:
5357
DOCKER_BUILD_RECORD_UPLOAD: false

template/{% if git_platform=="github.com" %}.github{% endif %}/workflows/ci.yml.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
needs: [check, test]
3939
if: needs.check.outputs.branch-pr == ''
4040
uses: ./.github/workflows/_container.yml
41+
with:
42+
publish: ${{needs.test.result == 'success'}}
4143
permissions:
4244
contents: read
4345
packages: write

0 commit comments

Comments
 (0)