Skip to content

Commit

Permalink
ci: fix canary version tags (#153)
Browse files Browse the repository at this point in the history
* ci: fix canary version tags

* ci: trigger update tags workflow after tag push
  • Loading branch information
cjorge-graphops authored Oct 27, 2023
1 parent 9438bfc commit 64fd4cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/trigger-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

jobs:
find-tags-to-release:
if: ${{ github.actor == 'graphops-renovate[bot]' }}
runs-on: ubuntu-latest
permissions:
contents: write # for creating tags
Expand Down Expand Up @@ -41,7 +40,11 @@ jobs:
for namespace_name in ${{ steps.list-changed-namespaces.outputs.all_modified_files }}; do
latest_version="$(git -c 'versionsort.suffix=-' tag --sort 'version:refname' --list "$namespace_name-*" | grep -Ev '.*-[[:digit:]]+.[[:digit:]]+.[[:digit:]]+-.*' | tail -n1)"
next_patch="$(echo "$latest_version" | sed -E 's/(.*-)?v?([[:digit:]]+).([[:digit:]]+).([[:digit:]]+)/echo \2.\3.$((\4 + 1))/e')"
if [ -z "$latest_version" ]; then
latest_version="${namespace_name}-v0.0.0"
fi
next_patch="$(echo "$latest_version" | sed -E 's/(.*-)?v?([[:digit:]]+).([[:digit:]]+).([[:digit:]]+)/echo v\2.\3.$((\4 + 1))/e')"
last_pre_tag="$(git -c 'versionsort.suffix=-' tag --sort 'version:refname' --list "$namespace_name-$next_patch-*" | tail -n1)"
if [ -z "$last_pre_tag" ]; then
index=1
Expand All @@ -61,7 +64,6 @@ jobs:
echo "EOF" >> $GITHUB_OUTPUT
call-update-tags:
if: ${{ github.actor == 'graphops-renovate[bot]' }}
uses: ./.github/workflows/update-tags.yaml
permissions:
contents: write
5 changes: 5 additions & 0 deletions .github/workflows/trigger-tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
- '*-v[0-9]+.[0-9]+.[0-9]+'

jobs:
call-update-tags:
uses: ./.github/workflows/update-tags.yaml
permissions:
contents: write

release:
uses: ./.github/workflows/make-release.yaml
permissions:
Expand Down

0 comments on commit 64fd4cf

Please sign in to comment.