Skip to content

Commit

Permalink
feat: add helm publish chart action
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Rabbito <[email protected]>
  • Loading branch information
anthr76 committed Jun 27, 2024
1 parent 8ce3343 commit 9297287
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/charts-release-oci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Charts: Release to GHCR OCI"

on:
push:
branches: [main]

jobs:
release-charts:
name: Release charts
permissions:
contents: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4

- name: Run chart-releaser
uses: helm/[email protected]
env:
skip_upload: true

- name: Push Charts to GHCR
run: |
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/chart
done

0 comments on commit 9297287

Please sign in to comment.