Skip to content

Try fix pushing to OCI #55

Try fix pushing to OCI

Try fix pushing to OCI #55

Workflow file for this run

name: Release Charts
on:
push:
branches:
- master
permissions:
contents: write
packages: write
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- 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: Prepare keys for signing
env:
SIGNING_KEY_BASE64: ${{ secrets.HELM_SIGNING_PRIVATE_KEY }}
SIGNING_KEY_PASSPHRASE_BASE64: ${{ secrets.HELM_SIGNING_PRIVATE_KEY_PASSPHRASE }}
KEY_PATH: ".gpg-dir"
SIGNING_KEY_PATH: ".gpg-dir/secring.gpg"
SIGNING_KEY_PASSPHRASE_PATH: ".gpg-dir/passphrase"
run: |
mkdir "$KEY_PATH"
base64 -d <<< "$SIGNING_KEY_BASE64" > "$SIGNING_KEY_PATH"
base64 -d <<< "$SIGNING_KEY_PASSPHRASE_BASE64" > "$SIGNING_KEY_PASSPHRASE_PATH"
echo "CR_PASSPHRASE_FILE=$SIGNING_KEY_PASSPHRASE_PATH" >> "$GITHUB_ENV"
echo "CR_KEYRING=$SIGNING_KEY_PATH" >> "$GITHUB_ENV"
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
config: .cr.yaml
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
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
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/helm-charts
done