-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (42 loc) · 1.25 KB
/
helm.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
45
46
47
name: helm flux-operator
on:
pull_request: []
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Prepare chart
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ^1.20
- name: GHCR Login
if: (github.event_name != 'pull_request')
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install Helm
run: |
export HELM_EXPERIMENTAL_OCI=1
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: Build chart
run: make helm
- name: Login to Helm
if: (github.event_name != 'pull_request')
env:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "${password}" | helm registry login -u ${username} --password-stdin ${registry}
PKG_RESPONSE=$(helm package ./chart)
echo "$PKG_RESPONSE"
CHART_TAR_GZ=$(basename "$PKG_RESPONSE")
helm push "$CHART_TAR_GZ" oci://ghcr.io/flux-framework/flux-operator-helm