Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix canary version tags #153

Merged
merged 2 commits into from Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/trigger-push.yaml
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
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