From 06f37c14781175ddca318f9d2f8dee0efc023cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Guilherme=20Vanz?= Date: Fri, 15 Mar 2024 13:40:01 -0300 Subject: [PATCH] fix(ci): publish artifacthub files in a dedicated branch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kubewarden policies should published the ArtifactHub files in a dedicated branch to avoid timing issues with the cronjob which check for new releases. Therefore, we avoid the issue of having the policy missing the "signed" flag in the ArtifactHub website. Signed-off-by: José Guilherme Vanz --- .github/workflows/release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8ed755..99dd86e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,3 +91,17 @@ jobs: with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} oci-target: ghcr.io/${{ github.repository_owner }}/policies/container-resources + + push-artifacthub: + # skip when releasing :latest from main, versions will not match + if: startsWith(github.ref, 'refs/tags/v') + needs: release + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + runs-on: ubuntu-latest + steps: + - + name: Push artifacthub files to artifacthub branch + uses: kubewarden/github-actions/push-artifacthub@v3.1.18