Skip to content

Commit

Permalink
Publish to GHCR registry
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesbusy committed Sep 12, 2024
1 parent 1e51f36 commit 989e6a2
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

permissions:
contents: write
packages: write

jobs:
release:
Expand All @@ -24,10 +25,17 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.12.0
version: v3.16.0

- name: Retrieve version from Chart.yaml
id: chart_version
Expand Down Expand Up @@ -84,6 +92,15 @@ jobs:
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Push Chart 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}/helm-charts
done
- name: Retrieve release info
id: release_info
if: steps.chart_releaser.outputs.changed_charts != ''
Expand Down

0 comments on commit 989e6a2

Please sign in to comment.