Skip to content

Commit

Permalink
workflows: allow push on manually run workflows
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
phlogistonjohn authored and obnoxxx committed Aug 20, 2024
1 parent da80103 commit f6a4c5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@ jobs:
runs-on: ubuntu-latest
env:
REPO_BASE: quay.io/samba.org
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'samba-in-kubernetes/samba-container'
# NOTE: the fromJSON below is needed beause the syntax github uses
# doesn't actually understand JS/JSON style arrays (inline). When I left it
# out I just got an error. It is present in their example(s).
if: >
contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name)
&& github.repository == 'samba-in-kubernetes/samba-container'
steps:
- uses: actions/checkout@v4
- name: log in to quay.io
Expand Down

0 comments on commit f6a4c5b

Please sign in to comment.