Skip to content

Commit

Permalink
Goreleaser extract version from metadata JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
manno committed Apr 10, 2024
1 parent f72b45f commit caa5b05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release-fleet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
repo: "ghcr.io/rancher"
tag: ${{ steps.goreleaser.outputs.metadata.tag }}
version: ${{ steps.goreleaser.outputs.metadata.version }}
run: |
version=$(echo '${{ steps.goreleaser.outputs.metadata }}' | jq -r '.version')
tag=$(echo '${{ steps.goreleaser.outputs.metadata }}' | jq -r '.tag')
echo "publishing helm chart for (repo: $repo, tag: $tag, version: $version)"
# Replace rancher/fleet, rancher/fleet-agent and rancher/gitjob image names, but not eg. rancher/kubectl
sed -i \
-e "s@repository: rancher/\(fleet.*\|gitjob\).*@repository: $repo/\\1@" \
Expand Down

0 comments on commit caa5b05

Please sign in to comment.