-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (70 loc) · 1.86 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
name: release
"on":
workflow_dispatch:
push:
branches:
- master
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
if: github.repository == 'promhippie/charts'
steps:
- name: Checkout source
id: source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup helm
id: helm
uses: azure/setup-helm@v4
- name: Configure Git
id: git
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Update readme
id: docs
uses: docker://jnorwood/helm-docs:v1.14.2
with:
entrypoint: helm-docs
- name: Write secring
id: secring
run: |
echo -n "${{ secrets.GNUPG_SECRING }}" \
| base64 --decode \
> secring.gpg
- name: Write passphrase
id: passphrase
run: |
echo -n "${{ secrets.GNUPG_PASSWORD }}" \
> passphrase
- name: Run releaser
id: releaser
uses: helm/[email protected]
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CR_KEYRING: secring.gpg
CR_PASSPHRASE_FILE: passphrase
with:
config: cr.yaml
charts_dir: stable
- name: Push charts
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login --username bothippie --password-stdin ghcr.io
for pkg in .cr-release-packages/*.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
echo "Pushing $pkg..."
helm push "$pkg" "oci://ghcr.io/$GITHUB_REPOSITORY_OWNER/charts"
done
- name: Remove secrets
id: cleanup
if: always()
run: |
rm -f secring.gpg passphrase
...