Skip to content

Commit

Permalink
Fetch tags before process
Browse files Browse the repository at this point in the history
  • Loading branch information
drinkataco committed Feb 3, 2024
1 parent 278f70a commit adfefac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: 'Automatically update chart versions'
run: |
#!/bin/bash
set -o pipefail # Catch errors in pipelines
# FIXME: Some issues with this job step that should be fixed and considered:
# 1. We assume the tag will be semvar. There is no checking or protections if not.
# 2. The previous tag is the last tag - and can be on any branch. We do not have any
Expand All @@ -45,6 +48,7 @@ jobs:
# will include this, meaning -dev and -alpha releases may have unintended consequences
# 4. If the Chart.yaml version is updated as part of the diff, then it will be bumped up
# again as part of this script. We should check the diffs and skip if so
git fetch --tags
current_tag="${GITHUB_REF#refs/tags/}"
previous_tag=$(git tag --sort=-creatordate | grep -A1 $CURRENT_TAG | tail -n1)
GIT_COMMIT=1 ./update_versions.sh "$previous_tag" "$current_tag"
Expand Down

0 comments on commit adfefac

Please sign in to comment.