On tag creation #2
Workflow file for this run
This file contains 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: On tag creation | |
on: | |
workflow_dispatch: | |
push: | |
tags: # https://github.com/orgs/community/discussions/25302 | |
- '*' | |
jobs: | |
test-git-tag-to-workflow-dispatch: | |
name: Test git-tag-to-workflow-dispatch | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
files: [example-001.yml] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # to get the tags | |
- name: Get the repository tags | |
run: | | |
THIS_GIT_TAGS=$(git tag --sort -creatordate --column) | |
echo "Git tags: ${THIS_GIT_TAGS}" | |
echo "THIS_GIT_TAGS=${THIS_GIT_TAGS}" >> "${GITHUB_ENV}" | |
- name: Run custom action | |
uses: FsharpGHActions/[email protected] | |
with: | |
values-to-take: 5 | |
workflow-file-name: ${{ matrix.files }} | |
workflow-yaml-key: 'version' | |
pull-request: true | |
# needs to be a PAT to update the workflows/ folder | |
github-token: ${{ secrets.PAT_GITHUB }} | |
git-tags: ${{ env.THIS_GIT_TAGS }} |