Skip to content

Commit ee249d0

Browse files
committed
chore: upload to OCI
Signed-off-by: fastlorenzo <git@bernardi.be>
1 parent f34cdae commit ee249d0

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/publish-chart.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ permissions:
55
id-token: write
66
contents: write
77
attestations: write
8+
packages: write
89

910
on:
1011
workflow_dispatch:
@@ -24,6 +25,9 @@ jobs:
2425
runs-on: ubuntu-latest
2526
outputs:
2627
release_body: ${{ fromJSON(steps.get_release.outputs.data).body }}
28+
env:
29+
OCI_REGISTRY: ghcr.io
30+
OCI_NAMESPACE: ${{ github.repository_owner }}/helm-charts
2731
steps:
2832
- name: Checkout
2933
uses: actions/checkout@v3
@@ -65,6 +69,14 @@ jobs:
6569
run: |
6670
cr package ${{ github.event.inputs.package }}
6771
72+
- name: Login to OCI registry (ghcr.io)
73+
run: |
74+
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.OCI_REGISTRY }} --username "${{ github.actor }}" --password-stdin
75+
76+
- name: Push chart to OCI
77+
run: |
78+
CHART_FILE=".cr-release-packages/${{ steps.extract_chart_name.outputs.chart_name }}-${{ github.event.inputs.version }}.tgz"
79+
helm push "$CHART_FILE" oci://${{ env.OCI_REGISTRY }}/${{ env.OCI_NAMESPACE }}
6880
- name: Attest Build Provenance
6981
uses: actions/attest-build-provenance@v2
7082
id: attest

0 commit comments

Comments
 (0)