-
Notifications
You must be signed in to change notification settings - Fork 0
ci: publish charts with hevi instead of chart-releaser-action #4
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,12 +19,12 @@ jobs: | |
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| # Runs on every master push. chart-releaser compares Chart.yaml's version | ||
| # against the published releases (CR_SKIP_EXISTING), so this is an idempotent | ||
| # no-op until the release-please PR carrying a version bump is merged. Do NOT | ||
| # gate this on release-please outputs: the chart package uses | ||
| # skip-github-release (chart-releaser owns tags + releases), so | ||
| # releases_created never fires for it. | ||
| # Runs on every master push. hevi compares Chart.yaml's version against the | ||
| # published releases (cr --skip-existing) and against the OCI registry | ||
| # (push-skip-existing), so this is an idempotent no-op until the release-please | ||
| # PR carrying a version bump is merged. Do NOT gate this on release-please | ||
| # outputs: the chart package uses skip-github-release (chart-releaser owns tags | ||
| # + releases), so releases_created never fires for it. | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| needs: release-please | ||
|
|
@@ -39,28 +39,20 @@ jobs: | |
| git config user.name "$GITHUB_ACTOR" | ||
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
|
|
||
| # hevi prefers a helm from PATH over its own pinned download, so pin it | ||
| # here to keep the packaged output independent of the runner image. | ||
| - name: Set up Helm | ||
| uses: azure/setup-helm@v4 | ||
|
Comment on lines
+42
to
45
|
||
|
|
||
| - name: Run chart-releaser | ||
| uses: helm/chart-releaser-action@v1 | ||
| - name: Package, release and push charts | ||
| uses: tada5hi/hevi@v2 | ||
| with: | ||
| charts_repo_url: https://helm.authup.org | ||
| env: | ||
| CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| CR_SKIP_EXISTING: "true" | ||
| CR_GENERATE_RELEASE_NOTES: "true" | ||
|
|
||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Push charts to GHCR (OCI) | ||
| run: | | ||
| shopt -s nullglob | ||
| for pkg in .cr-release-packages/*.tgz; do | ||
| helm push "$pkg" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/helm-charts" | ||
| done | ||
| directory: charts | ||
| package: true | ||
| release: true | ||
| release-generate-notes: true | ||
| push: true | ||
| push-host: ghcr.io/${{ github.repository_owner }}/helm-charts | ||
| push-username: ${{ github.actor }} | ||
| push-password: ${{ secrets.GITHUB_TOKEN }} | ||
| push-skip-existing: true | ||
|
Comment on lines
+47
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n 'uses:\s*tada5hi/hevi@' .github/workflows/release.yaml
git ls-remote https://github.com/tada5hi/hevi.git refs/tags/v2 refs/tags/v2.0.1Repository: authup/helm Length of output: 294 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf 'Workflow relevant lines:\n'
sed -n '40,65p' .github/workflows/release.yaml | nl -ba -v40
printf '\nGitHub API refs/tags/v2 object type and sha:\n'
gh api repos/tada5hi/hevi/git/refs/tags/v2 --jq '{ref: .ref, type: .object.type, sha: .object.sha}'
printf '\nIf annotated tag, dereference to commit:\n'
ref_type="$(gh api repos/tada5hi/hevi/git/refs/tags/v2 --jq '.object.type')"
ref_sha="$(gh api repos/tada5hi/hevi/git/refs/tags/v2 --jq '.object.sha')"
if [ "$ref_type" = tag ]; then
gh api "repos/tada5hi/hevi/git/tags/${ref_sha}" --jq '{object_type: .object.type, object_sha: .object.sha}'
fi
printf '\nExplicit tag dereference commit hash with git ls-remote:\n'
git ls-remote https://github.com/tada5hi/hevi.git refs/tags/v2^{0} refs/tags/v2.0.1Repository: authup/helm Length of output: 214 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf 'Workflow relevant lines:\n'
sed -n '40,65p' .github/workflows/release.yaml
printf '\nGit ls-remote refs:\n'
git ls-remote https://github.com/tada5hi/hevi.git refs/tags/v2 refs/tags/v2.0.1 refs/tags/v2^{0}Repository: authup/helm Length of output: 1026 Pin Hevi to an immutable revision.
🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,5 +4,6 @@ | |
| *.tgz | ||
| .cr-release-packages/ | ||
| .cr-index/ | ||
| .hevi/ | ||
| charts/*/values.local.yaml | ||
| charts/*/values.personal.yaml | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: authup/helm
Length of output: 835
🏁 Script executed:
Repository: authup/helm
Length of output: 185
🏁 Script executed:
Repository: authup/helm
Length of output: 3355
Pin the Helm binary version.
azure/setup-helm@v4defaultsversiontolatest. This release job uses Hevi after installing Helm without a fixed version, so a new upstream Helm release can change chart packaging, release notes, or OCI push behavior. Set an explicit, vetted Helm version inazure/setup-helm@v4.🤖 Prompt for AI Agents