Skip to content

Conversation

@marip8
Copy link
Contributor

@marip8 marip8 commented Jun 18, 2025

Changes per commit message to allow for manual regeneration of Docker images.

@marip8
Copy link
Contributor Author

marip8 commented Jun 18, 2025

Note, it appears that triggering a workflow_dispatch event looks to the action as if it came from the master branch, which causes the Docker meta-information step to generate a tag for type=ref,event=branch,prefix=${{ matrix.distro }}-,value=${{ env.BRANCH_NAME }}. This can be somewhat problematic when manually running the workflow at a git tag (e.g., 0.29.2) because it results in two Docker tags being created: <distro>-<major.minor> (as intended) and <distro>-master (which isn't truly isn't at the head of the master branch). Ultimately both created images get pushed to the registry.

I haven't come up with a good solution for this yet. The Docker meta-information tag specifications allow for enabling them with enable=..., so maybe there is something we can do there like:

type=ref,event=branch,prefix=${{ matrix.distro }}-,value=${{ env.BRANCH_NAME }},enable=${{ github.event_name != 'workflow_dispatch' }}

but the above specifically would prevent us from rebuilding and pushing the image for the master branch.

I also considered trying to extract the highest priority tag from the list of tags provided by ${{ steps.meta.outputs.tags }}, but I think the tags are provided as a CSV list, so ${{ fromJSON(steps.meta.outputs.tags)[0] }} does not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant