-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.3 KB
/
helm.yml
File metadata and controls
40 lines (37 loc) · 1.3 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
name: publish-chart
permissions:
packages: write
contents: read
on:
# we only publish the chart after succesful Docker build so we trigger
# a full build when chart templates are changed, this is slightly suboptimal
# TODO automatically bump chart version during build
workflow_run:
workflows: ["publish-image"]
types: [completed]
branches: ["main"]
jobs:
publish-chart:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- chart_name: okapi-hooks
chart_version: "0.1.0-main.${{ github.run_number }}"
chart_path: chart
steps:
- uses: actions/checkout@v6
- name: helm lint
run: |
helm lint ${{ matrix.chart_path }}
- name: helm login
run: |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io -u $ --password-stdin
- name: helm package
run: |
helm package ${{ matrix.chart_path }} --version "${{ matrix.chart_version }}+sha.$(echo $GITHUB_SHA | cut -c1-7)"
- name: helm push
run: |
helm push "${{ matrix.chart_name }}-${{ matrix.chart_version }}+sha.$(echo $GITHUB_SHA | cut -c1-7).tgz" oci://ghcr.io/${{ github.repository_owner }}/charts