Skip to content

Commit e9355d0

Browse files
author
Jens Plüddemann
committed
publish helm chart to gh pages
1 parent a311096 commit e9355d0

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: package-helm-chart
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'deploy/helm/**'
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
package-helm-chart:
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set environment variables
25+
id: set-variables
26+
run: |
27+
echo "REPOSITORY=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
28+
echo "VERSION=$(yq -r .version ./deploy/helm/grafana-ldap-sync/Chart.yaml)" >> "$GITHUB_OUTPUT"
29+
30+
- name: Env variable output
31+
id: test-variables
32+
run: |
33+
echo ${{ steps.set-variables.outputs.REPOSITORY }}
34+
echo ${{ steps.set-variables.outputs.VERSION }}
35+
36+
- name: Login to GitHub Container Registry
37+
uses: docker/v3
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.actor }}
41+
password: ${{ github.token }}
42+
43+
- name: Package and push helm chart
44+
run: |
45+
helm package ./deploy/helm/grafana-ldap-sync --version ${{ steps.set-variables.outputs.VERSION }}
46+
helm push ./grafana-ldap-sync-${{ steps.set-variables.outputs.VERSION }}.tgz oci://${{ steps.set-variables.outputs.REPOSITORY }}/charts
47+
48+
publish-helm-chart:
49+
permissions:
50+
id-token: write
51+
packages: write
52+
contents: write
53+
actions: read
54+
deployments: read
55+
pull-requests: read
56+
57+
runs-on: ubuntu-latest
58+
59+
steps:
60+
- name: Checkout code
61+
uses: actions/checkout@v4
62+
63+
- name: Publish Helm chart to GitHub Pages
64+
uses: stefanprodan/helm-gh-pages@master
65+
with:
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
linting: off

0 commit comments

Comments
 (0)