-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.38 KB
/
helm-chart.yml
File metadata and controls
56 lines (46 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Package and Push Helm Chart
on:
push:
tags: [ 'ci-deployment-cleanup-v*' ]
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
helm-chart:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: '3.14.0'
- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine app version
id: version
run: |
VERSION=$(echo "${{ github.ref_name }}" | sed 's/ci-deployment-cleanup-v//')
echo "appVersion=$VERSION" >> $GITHUB_OUTPUT
- name: Update Chart.yaml with app version
run: |
cd ci-deployment-cleanup/helm-chart
sed -i "s/appVersion: .*/appVersion: \"${{ steps.version.outputs.appVersion }}\"/" Chart.yaml
- name: Lint Helm chart
run: |
cd ci-deployment-cleanup
helm lint helm-chart/
- name: Package and push Helm chart
run: |
cd ci-deployment-cleanup
helm package helm-chart/
helm push *.tgz oci://${{ env.REGISTRY }}/swissdatasciencecenter/helm-charts