Skip to content

Commit

Permalink
fix: Push charts to GHCR requires login (#2998)
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Maurer <mkilchhofer@users.noreply.github.com>
  • Loading branch information
mkilchhofer committed Apr 8, 2024
1 parent 3761a1f commit 1e803f8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ jobs:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: "true"

- name: Login to GHCR
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push charts to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*; do
for pkg in .cr-release-packages/*.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
if ! helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts"; then
echo '::warning:: helm push failed!'
fi
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/helm-charts"
done

0 comments on commit 1e803f8

Please sign in to comment.