From eb6a2a3993ef69f0611fd8620518e9884931ab51 Mon Sep 17 00:00:00 2001 From: Jose Riguera Date: Wed, 13 Mar 2024 21:58:19 +0100 Subject: [PATCH] Add make step --- .github/workflows/release-artifacts.yml | 34 +++++++++++++------------ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index 7c06992..31395fa 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -71,12 +71,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 - name: Configure Git run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Run make + run: | + # This step is not needed per se, but runs all the tests + # and generate the manifests + make && cp -v config/crd/bases/* charts/mimirrules-controller/crds/ - name: Set up Helm uses: azure/setup-helm@v4 @@ -89,18 +95,14 @@ jobs: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" CR_SKIP_EXISTING: "true" - # - 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 - echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io/${GITHUB_REPOSITORY_OWNER} --username ${{ github.actor }} --password-stdin - for pkg in .cr-release-packages/*; do - [ -z "${pkg:-}" ] && break - helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts" || echo "::warning title=Helm push::Helm push artifact to GH Registry has failed!" - done \ No newline at end of file + shopt -s nullglob + helm registry login ghcr.io/${GITHUB_REPOSITORY_OWNER} --username ${{ github.actor }} --password $TOKEN + for pkg in $(shopt -s nullglob;echo .cr-release-packages/*) + do + [ -z "${pkg:-}" ] && break + helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts" || echo "::warning title=Helm push::Helm push artifact to GH Registry has failed!" + done + env: + TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file