Skip to content

Commit 7c60fda

Browse files
committed
Add workflows to test and release helm charts
1 parent 562361e commit 7c60fda

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/workflows/helm-release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release Helm Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'helm-charts/**'
9+
10+
permissions:
11+
contents: read
12+
packages: write
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Install Helm
22+
uses: azure/setup-helm@v4
23+
24+
- name: Login to GitHub Container Registry
25+
run: |
26+
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
27+
28+
- name: Package and push chart
29+
run: |
30+
cd helm-charts/digger-backend
31+
helm package .
32+
helm push digger-backend-*.tgz oci://ghcr.io/diggerhq/helm-charts

.github/workflows/helm-test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test Helm Charts
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'helm-charts/**'
7+
- '.github/workflows/helm-test.yml'
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Install Helm
17+
uses: azure/setup-helm@v4
18+
19+
- name: Install helm-unittest
20+
run: |
21+
helm plugin install https://github.com/helm-unittest/helm-unittest.git
22+
23+
- name: Lint chart
24+
run: |
25+
helm lint helm-charts/digger-backend
26+
27+
- name: Run unit tests
28+
run: |
29+
helm unittest helm-charts/digger-backend

0 commit comments

Comments
 (0)