This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
70 lines (58 loc) · 2.04 KB
/
release.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Release Charts
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "charts/**"
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: 3.13.2
- name: Install sigstore Helm plugin
run: |
helm plugin install https://github.com/sigstore/helm-sigstore
- name: Install GPG Keys
run: |
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --import --batch
gpg --export > /home/runner/.gnupg/pubring.gpg
gpg --export-secret-keys > /home/runner/.gnupg/secring.gpg
- name: Login to GitHub Container Registry
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run chart-releaser
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SIGN: "true"
CR_KEY: "${{ secrets.GPG_KEY_NAME }}"
CR_KEYRING: "/home/runner/.gnupg/secring.gpg"
- name: Upload Helm Charts to Rekor
run: |
for chart in `find .cr-release-packages -name '*.tgz' -print`; do
helm sigstore upload --keyring=/home/runner/.gnupg/secring.gpg ${chart}
done
- name: Push Charts as OCI to GHCR
run: |
for chart in `find .cr-release-packages -name '*.tgz' -print`; do
helm push ${chart} oci://ghcr.io/${GITHUB_REPOSITORY}
done