Skip to content

Commit 2aa6741

Browse files
jiridanekopenshift-cherrypick-robot
authored andcommitted
RHOAIENG-19036: chore(gha): fix workflow_dispatch invocation
Previously, triggering the GitHub action manually would not build the image, and so the tests would then fail. The cause is that we do different build commands depending whether it's builting on push, on pr, or on schedule, and for manual trigger nothing was defined.
1 parent 0bc66a7 commit 2aa6741

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/build-notebooks-TEMPLATE.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,19 @@ jobs:
237237
# region Image build
238238

239239
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
240-
- name: "push|schedule: make ${{ inputs.target }}"
240+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
241+
242+
- name: "push|schedule|workflow_dispatch: make ${{ inputs.target }}"
241243
run: |
242244
make ${{ inputs.target }}
243-
if: ${{ fromJson(inputs.github).event_name == 'push' || fromJson(inputs.github).event_name == 'schedule' }}
245+
if: ${{ fromJson(inputs.github).event_name == 'push' ||
246+
fromJson(inputs.github).event_name == 'schedule' ||
247+
fromJson(inputs.github).event_name == 'workflow_dispatch' }}
244248
env:
245249
IMAGE_TAG: "${{ steps.calculated_vars.outputs.IMAGE_TAG }}"
246250
CONTAINER_BUILD_CACHE_ARGS: "--cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"
247251
# dependent images were already built and pushed, so just let podman pull it
248252
BUILD_DEPENDENT_IMAGES: "no"
249-
250-
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
251253
- name: "pull_request: make ${{ inputs.target }}"
252254
run: |
253255
make ${{ inputs.target }}

0 commit comments

Comments
 (0)