From d2443fedc07be4f340eb30ad0610b1146d8c36d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=E1=B4=87=CA=80=C9=B4=E1=B4=85=20S=E1=B4=84=CA=9C?= =?UTF-8?q?=E1=B4=8F=CA=80=C9=A2=E1=B4=87=CA=80s?= Date: Wed, 27 Jul 2022 10:53:50 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=A7=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/charts-release.yaml | 45 +++++++++++++++++++-------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index b2020364..325ade59 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -55,19 +55,38 @@ jobs: helm package "$CHART" -u -d "$DEST_DIR/$CHART_TYPE" done - - name: Create new index - shell: bash - working-directory: dest - run: | - helm repo index . --url https://bjw-s.github.io/helm-charts/ + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - - name: Push changes + - name: Push Charts to GHCR shell: bash - working-directory: dest + env: + DEST_DIR: "dest" run: | - git config user.name "bjw-s-bot[bot]" - git config user.email "bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>" - git add $(git ls-files -o --exclude-standard) - git add index.yaml - git commit -m "Updated from ref: $GITHUB_SHA" - git push + for pkg in $DEST_DIR/**/*; do + if [ -z "${pkg:-}" ]; then + break + fi + helm push "${pkg}" oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/helm-charts + done + + # - name: Create new index + # shell: bash + # working-directory: dest + # run: | + # helm repo index . --url https://bjw-s.github.io/helm-charts/ + + # - name: Push changes + # shell: bash + # working-directory: dest + # run: | + # git config user.name "bjw-s-bot[bot]" + # git config user.email "bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>" + # git add $(git ls-files -o --exclude-standard) + # git add index.yaml + # git commit -m "Updated from ref: $GITHUB_SHA" + # git push