Skip to content

Commit d240e73

Browse files
Trying a better publishing mechanism.
Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com>
1 parent 8274932 commit d240e73

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ on:
55
branches: [ master ]
66

77
jobs:
8-
release:
8+
prepare:
9+
runs-on: ubuntu-latest
10+
911
permissions:
1012
contents: write
1113
packages: write
12-
runs-on: ubuntu-latest
14+
15+
outputs:
16+
changed_charts: ${{ steps.chart-releaser.outputs.changed_charts }}
17+
version: ${{ steps.chart-releaser.outputs.chart_version }}
18+
1319
steps:
1420
- name: Checkout
1521
uses: actions/checkout@v4
@@ -21,8 +27,10 @@ jobs:
2127
git config user.name "$GITHUB_ACTOR"
2228
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
2329
24-
- name: Install Helm
25-
uses: azure/setup-helm@v3
30+
- name: Set up Helm
31+
uses: azure/setup-helm@v4.3.0
32+
with:
33+
version: v3.12.0
2634

2735
- name: Install Helm Deps
2836
run: |
@@ -35,12 +43,21 @@ jobs:
3543
uses: helm/chart-releaser-action@v1.7.0
3644
env:
3745
CR_TOKEN: "${{ secrets.CR_TOKEN }}"
46+
CR_GENERATE_RELEASE_NOTES: true
3847

39-
- name: Run chart-releaser (OCI)
40-
uses: appany/helm-oci-chart-releaser@v0.3.0
48+
- name: Login to GitHub Container Registry
49+
uses: docker/login-action@v3.3.0
4150
with:
4251
registry: ghcr.io
43-
repository: dandydeveloper
44-
tag: ${{ steps.chart-releaser.outputs.chart_version }}
45-
registry_username: ${{ secrets.USERNAME }}
46-
registry_password: ${{ secrets.CR_TOKEN }}
52+
username: ${{ github.actor }}
53+
password: ${{ secrets.CR_TOKEN }}
54+
55+
- name: Push charts to GHCR
56+
run: |
57+
shopt -s nullglob
58+
for pkg in .cr-release-packages/*; do
59+
if [ -z "${pkg:-}" ]; then
60+
break
61+
fi
62+
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts"
63+
done

0 commit comments

Comments
 (0)