Skip to content

Commit 4b79cff

Browse files
committed
chore(gha): update release workflows for Helm chart (#25)
1 parent d74a4c7 commit 4b79cff

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/release-chart.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@ on:
22
push:
33
branches:
44
- main
5+
workflow_dispatch:
6+
inputs:
7+
ref:
8+
description: 'Branch, commit, or tag to checkout'
9+
required: true
510

611
jobs:
712
release:
813
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
916
steps:
1017
- name: Checkout
1118
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
1219
with:
20+
ref: ${{ github.event.inputs.ref || github.ref }}
1321
fetch-depth: 0
1422
- name: Configure Git
1523
run: |
@@ -24,3 +32,6 @@ jobs:
2432
env:
2533
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2634
CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}"
35+
with:
36+
mark_as_latest: "false"
37+
skip_existing: ${{ github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main' && 'false' || 'true' }}

.github/workflows/release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ jobs:
6565
env:
6666
RELEASE_VERSION: ${{ steps.version.outputs.VERSION }}
6767
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
- name: Remove Git Tags with Charts
69+
if: ${{ steps.version.outputs.IS_TAG == 'true' }}
70+
## This is needed for goreleaser to detect the previous releases correctly
71+
run: git tag -d $(git tag -l "helm-chart-*")
6872
- name: GoReleaser Release
6973
if: ${{ steps.version.outputs.IS_TAG == 'true' }}
7074
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6

0 commit comments

Comments
 (0)