Closed iaingalloway closed 1 year ago
Ignoring all tags results in the build not running at all:
on:
push:
tags-ignore:
- '*'
pull_request:
workflow_dispatch:
See: https://github.com/iaingalloway/gitversion-prototype/commit/721342b2459ef85d8cd0761b3da7feee2a7ad36d
Works if I specify both tags-ignore
and branches
.
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
workflow_dispatch:
Seems like quite an odd default behaviour. The docs mention this: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
If you define only tags/tags-ignore or only branches/branches-ignore, the workflow won't run for events affecting the undefined Git ref.
But it could be clearer.
This commit:
https://github.com/iaingalloway/gitversion-prototype/commit/81273623b0837cf86af11b62abd5795460aa50de
Is tagged v1.0.0
I created it with
Workflows were queued twice:
https://github.com/iaingalloway/gitversion-prototype/actions/runs/6676439638 https://github.com/iaingalloway/gitversion-prototype/actions/runs/6676439672
And two images were created with different SHAs:
https://github.com/iaingalloway/gitversion-prototype/pkgs/container/gitversion-prototype/142030062?tag=1.0.0 https://github.com/iaingalloway/gitversion-prototype/pkgs/container/gitversion-prototype/142030077?tag=1.0.0.main--14ef668
They both have the same version:
So they're tagged correctly, but I don't think I want two builds here.