File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 7
7
release :
8
8
permissions :
9
9
contents : write
10
+ packages : write
11
+ id-token : write
10
12
runs-on : ubuntu-latest
11
13
steps :
12
14
- name : Checkout
17
19
run : |
18
20
git config user.name "$GITHUB_ACTOR"
19
21
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
22
+
23
+ # Release tgz to github page
20
24
- name : Run chart-releaser
21
25
uses : helm/chart-releaser-action@v1.6.0
22
26
with :
23
27
config : " ./cr.yaml"
24
28
env :
25
29
CR_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
30
+
31
+ # Release to OCI registry
32
+ - name : Login to GitHub Container Registry
33
+ uses : docker/login-action@v3
34
+ with :
35
+ registry : ghcr.io
36
+ username : ${{ github.actor }}
37
+ password : ${{ secrets.GITHUB_TOKEN }}
38
+
39
+ - name : Push charts to GHCR
40
+ run : |
41
+ shopt -s nullglob
42
+ for pkg in .cr-release-packages/*; do
43
+ if [ -z "${pkg:-}" ]; then
44
+ break
45
+ fi
46
+ lowercase=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
47
+ echo "Pushing package - ${pkg} to ghcr.io repository - ${lowercase}"
48
+ helm push "${pkg}" "oci://ghcr.io/${lowercase}"
49
+ done
You can’t perform that action at this time.
0 commit comments