-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (32 loc) · 1.29 KB
/
chart.yaml
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
name: Publish Helm chart
on:
workflow_dispatch:
jobs:
publish:
name: Publish Helm Chart to GitHub Container registry
runs-on: ubuntu-latest
permissions:
packages: write
defaults:
run:
working-directory: ./charts/dangobot
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Add chart dependencies to Helm
run: helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Download chart dependencies
run: helm dependency build
- name: Package chart
run: helm package .
- name: Get the chart version
id: vars
run: echo "version=$(helm show chart . | grep -E "^version:" | awk '{print $2}')" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
run: echo '${{ secrets.GITHUB_TOKEN }}' | helm registry login -u '${{ github.repository_owner }}' --password-stdin ghcr.io/${{ github.repository_owner }}
- name: Push package
run: helm push dangobot-${{ steps.vars.outputs.version }}.tgz oci://ghcr.io/${{ github.repository_owner }}/dangobot
- name: Get image
id: output
shell: bash
run: echo 'image=${{ inputs.registry }}/${{ inputs.repository }}/${{ inputs.name }}:${{ inputs.tag }}' >> $GITHUB_OUTPUT