Some jobs require knowing the tag. Usually this is available through the GITHUB_REF environment variable if the workflow runs on.push.tags.
Since Github Actions cannot trigger other workflows, we are not able to have a workflow to bump the semver, then another to trigger off that.
For workflows triggered by on.push.branches: ["master"], GITHUB_REF=refs/heads/master.
So we need to get the tag ourselves (eg: git rev-parse or git describe --tags). However, the checkout action does a shallow checkout.
We then end up with repeated blocks to fetch tags, like:
Some jobs require knowing the tag. Usually this is available through the
GITHUB_REF
environment variable if the workflow runson.push.tags
.Since Github Actions cannot trigger other workflows, we are not able to have a workflow to bump the semver, then another to trigger off that.
For workflows triggered by
on.push.branches: ["master"]
,GITHUB_REF=refs/heads/master
. So we need to get the tag ourselves (eg:git rev-parse
orgit describe --tags
). However, the checkout action does a shallow checkout.We then end up with repeated blocks to fetch tags, like:
https://github.com/NickLarsenNZ/terrain/blob/eedb626fb8266ef81f4f27750bd565e269fa3a67/.github/workflows/merge-master.yml#L40-L49
https://github.com/NickLarsenNZ/terrain/blob/eedb626fb8266ef81f4f27750bd565e269fa3a67/.github/workflows/merge-master.yml#L51-L53
This should become an action.