PoC: minimal tag-only workflow to test trigger from arbitrary branch #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PoC - tag trigger fires from arbitrary branch | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+*' | |
| permissions: read-all | |
| jobs: | |
| proof: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Print trigger context | |
| run: | | |
| echo "SHA: ${{ github.sha }}" | |
| echo "Ref: ${{ github.ref }}" | |
| echo "Ref name: ${{ github.ref_name }}" | |
| echo "Event: ${{ github.event_name }}" | |
| echo "" | |
| echo "The workflow file that just ran was defined on the tagged commit." | |
| echo "The tagged commit lives on branch poc/tag-trigger-any-branch — NOT a release branch." | |
| echo "This proves the tag-push trigger fires regardless of what branch the tagged commit is on," | |
| echo "and that the workflow file used is the one at the tagged commit, not master's." |