workflow dispatch event for manual triggers
I would like to trigger the builds manually using workflow_dispatch event.
Example: on: workflow_dispatch:
want to know whether workflow_dispatch is supported? Because under usage it doesn't list workflow_dispatch event (manual trigger), but only push, push tag & pull request events.
Any help would be much appreciated!
+1 for this.
The first thing needed here is really just a simple confirmation whether manually trigged workflows are expected to run as normal, or whether there may be an issue with a manually triggered workflow using this action that does not otherwise affect code push tirggered workflow which includes this action.
workflow_dispatch event is considered the same as a push event with this action as GITHUB_REF is always a branch:
- https://github.com/docker/metadata-action/blob/master/tests/fixtures/event_workflow_dispatch.env
- https://github.com/docker/metadata-action/blob/master/tests/fixtures/event_workflow_dispatch_dev.env
For example manually triggered buildx-977 workflow from main branch:
name: buildx-977
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: [${{ env.LOCAL_SLUG }}](localhost:5000/name/app)
Will output the following tags: https://github.com/crazy-max/buildx-buildkit-tests/actions/runs/3207355576/jobs/5242149214#step:5:38
