Skip to content

ci(deps): update gnosis dependencies #967

ci(deps): update gnosis dependencies

ci(deps): update gnosis dependencies #967

Workflow file for this run

name: Tag on Renovate Commits (Canary)
on:
push:
branches:
- 'main'
jobs:
find-tags-to-release:
runs-on: ubuntu-latest
permissions:
contents: write # for creating tags
outputs:
release-tags: ${{ steps.list-release-tags.outputs.release-tags }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
- name: Get list of changed namespaces
id: list-changed-namespaces
uses: tj-actions/[email protected]
with:
files: |
./*/helmfile.yaml
./*/values/**
dir_names: "true"
dir_names_max_depth: "1"
- name: List and create tags
id: list-release-tags
shell: bash
run: |
set -e
tags=()
for namespace_name in ${{ steps.list-changed-namespaces.outputs.all_modified_files }}; do
set +e
latest_version="$(git -c 'versionsort.suffix=-' tag --sort 'version:refname' --list "$namespace_name-*" | grep -E '.*-v?[[:digit:]]+.[[:digit:]]+.[[:digit:]]+$' | tail -n1)"
set -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')"
set +e
last_pre_tag="$(git -c 'versionsort.suffix=-' tag --sort 'version:refname' --list "$namespace_name-$next_patch-*" | tail -n1)"
set -e
if [ -z "$last_pre_tag" ]; then
index=1
else
index=$(echo "$last_pre_tag" | sed -E 's/(.*-)?v?[[:digit:]]+.[[:digit:]]+.[[:digit:]]+-canary.([[:digit:]]+)(#.*)?/echo $((\2 + 1))/e')
fi
next_tag="$namespace_name-$next_patch-canary.$index"
tags+=("$next_tag")
git tag -a "$next_tag" -m "Release $next_tag"
done
git push --tags
echo "release-tags<<EOF" >> $GITHUB_OUTPUT
echo "$(jq -Rc '. / " "' <<< ${tags[*]})" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
call-update-tags:
uses: ./.github/workflows/update-tags.yaml
needs:
- find-tags-to-release
permissions:
contents: write
secrets:
LABELS_TOKEN: "${{ secrets.LABELS_TOKEN }}"