Skip to content

Commit d46eb3d

Browse files
workflows: allow push on manually run workflows
A while back we enabled running workflow manually in the action (with a button on the github ui) via the workflow_dispatch type. However, this action doesn't run the 'push' step because push is only included with a scheduled run or a merged pr. Rework the line so that push is performed for scheduled runs, merged prs, or manual runs. This is useful in case something samba-container depends on is updated and one doesn't feel like waiting all day for a scheduled run. Signed-off-by: John Mulligan <[email protected]>
1 parent da80103 commit d46eb3d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/container-image.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ jobs:
233233
runs-on: ubuntu-latest
234234
env:
235235
REPO_BASE: quay.io/samba.org
236-
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'samba-in-kubernetes/samba-container'
236+
# NOTE: the fromJSON below is needed beause the syntax github uses
237+
# doesn't actually understand JS/JSON style arrays (inline). When I left it
238+
# out I just got an error. It is present in their example(s).
239+
if: >
240+
contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name)
241+
&& github.repository == 'samba-in-kubernetes/samba-container'
237242
steps:
238243
- uses: actions/checkout@v4
239244
- name: log in to quay.io

0 commit comments

Comments
 (0)