Skip to content

testing (#14) #15

testing (#14)

testing (#14) #15

Workflow file for this run

---
name: Tag Build
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches:
- tagging
paths-ignore:
- '.github/**'
- './catalog-info.yaml'
- '**/README.md'
jobs:
get-changes:
runs-on: ubuntu-latest
outputs:
changed_files: ${{ steps.dir_changes.outputs.all_changed_files }}
steps:
- name: Github Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Directory changes
uses: tj-actions/changed-files@v44
id: dir_changes
with:
dir_names: true
dir_names_include_files: false
dir_names_max_depth: 3
matrix: true
files_ignore: |
.github/**
update-tags:
name: Tag update for ${{ matrix.changed-folder }}
strategy:
fail-fast: false
matrix:
changed-folder: ${{ fromJSON(needs.get-changes.outputs.changed_files) }}
runs-on: ubuntu-latest
needs:
- get-changes
permissions:
contents: write
steps:
- name: Github Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Show module - ${{ matrix.changed-folder }}
run: |
echo "Tag folder ${{ matrix.changed-folder }} " >> ${GITHUB_STEP_SUMMARY}
- name: Generate tag name
id: tag-name
env:
FOLDER: ${{ matrix.changed-folder }}
run: |
for path in ${FOLDER}; do
IFS='/' read -ra parts <<< "$path"
if [ "${#parts[@]}" -ge 2 ]; then
first=${parts[0]}
second="${parts[1]}"
echo "tag-name=${first}-${second}-v"
echo "tag-name=${first}-${second}-v" >> ${GITHUB_OUTPUT}
fi
done
- name: Show tag - ${{ steps.tag-name.outputs.tag-name }}
run: |
echo "Tag to create ${{ steps.tag-name.outputs.tag-name }} " >> ${GITHUB_STEP_SUMMARY}
- name: Bump version and push tag
uses: timothyclarke/github-tag-action@a970082a7a44289bdaa93dfdc33110b94ff86ee1
# uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
DEFAULT_BRANCH: tagging
RELEASE_BRANCHES: tagging
TAG_PREFIX: ${{ steps.tag-name.outputs.tag-name }}
PRERELEASE: false
VERBOSE: true
DEFAULT_BUMP: patch
BRANCH_HISTORY: last