Skip to content

Commit

Permalink
fix: release workflow, properly discover released tags
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Ortega <[email protected]>
  • Loading branch information
M0NsTeRRR committed Dec 19, 2024
1 parent b0b060a commit 7e9f3fc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
# get current version
current_version=$(grep '^version:' "$chart_path/Chart.yaml" | awk '{print $2}')
# get current release version
oras discover ghcr.io/${GITHUB_REPOSITORY@L}/${chart}:${current_version}
released_tags=$(oras repo tags ghcr.io/${GITHUB_REPOSITORY@L}/${chart})
if [ $? -ne 0 ]; then
if ! echo "$released_tags" | grep -qE "^${current_version}$"; then
helm dependency build "$chart_path"
helm package "$chart_path" --destination ./.cr-release-packages
else
Expand Down Expand Up @@ -89,7 +89,9 @@ jobs:
COSIGN_YES: true
run: |
for chart_path in `find .cr-release-packages -name '*.tgz' -print`; do
# push chart to OCI
# push chart to OCI
ls .cr-release-packages
echo $chart_path
helm push ${chart_path} oci://ghcr.io/${GITHUB_REPOSITORY@L} |& tee helm-push-output.log
chart_release_file=$(basename "$chart_path")
chart=${chart_release_file%-*}
Expand Down

0 comments on commit 7e9f3fc

Please sign in to comment.