Skip to content

Commit aa63061

Browse files
onedr0ppcallewaert
authored andcommitted
ci: push Helm Chart to GHCR
Fixes: #221
1 parent c5fcbe3 commit aa63061

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/chart.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
permissions:
1414
contents: write
15+
packages: write
1516
steps:
1617
- name: Checkout
1718
uses: actions/checkout@v4
@@ -26,11 +27,31 @@ jobs:
2627
- name: Install Helm
2728
uses: azure/setup-helm@v4
2829
with:
29-
version: v3.10.0
30+
version: v3.18.2
3031

3132
- name: Run chart-releaser
3233
uses: helm/[email protected]
34+
id: cr
3335
with:
3436
charts_dir: charts
3537
env:
3638
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
39+
CR_SKIP_EXISTING: "true"
40+
41+
- if: ${{ steps.cr.outputs.changed_charts }}
42+
name: Login to GitHub Container Registry
43+
uses: docker/login-action@v3
44+
with:
45+
registry: ghcr.io
46+
username: ${{ github.actor }}
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
49+
- if: ${{ steps.cr.outputs.changed_charts }}
50+
name: Push Charts to GHCR
51+
run: |
52+
for pkg in .cr-release-packages/*; do
53+
if [ -z "${pkg:-}" ]; then
54+
break
55+
fi
56+
helm push "${pkg}" oci://ghcr.io/${{ github.repository }}/charts
57+
done

0 commit comments

Comments
 (0)