From 836c2bcf9af4da00d0da1d448fb6bd358aabdf71 Mon Sep 17 00:00:00 2001 From: Christian Zunker Date: Thu, 19 Dec 2024 08:48:40 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Trigger=20bump=20PR=20after=20go?= =?UTF-8?q?releaser=20is=20finished?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way, we can trigger a release in cnspec from this event. cnspec requires the cnquery container to do its own release. Related-to https://github.com/mondoohq/cnspec/pull/1520 Signed-off-by: Christian Zunker --- .github/workflows/bump-cnspec.yml | 19 ------------------- .github/workflows/goreleaser.yml | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/bump-cnspec.yml diff --git a/.github/workflows/bump-cnspec.yml b/.github/workflows/bump-cnspec.yml deleted file mode 100644 index 05c2a4d88d..0000000000 --- a/.github/workflows/bump-cnspec.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Trigger cnquery bump in cnspec - -on: - release: - types: [published] - -jobs: - trigger-cnspec: - runs-on: ubuntu-latest - steps: - - name: Trigger cnquery bump in cnspec - uses: peter-evans/repository-dispatch@v3 - with: - token: ${{ secrets.RELEASR_ACTION_TOKEN }} - repository: "mondoohq/cnspec" - event-type: update-cnquery - client-payload: '{ - "version": "${{ github.ref_name }}" - }' diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 47378890c6..fa21b6848b 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -173,6 +173,20 @@ jobs: "version": "${{ github.ref_name }}" }' + # At this point we know the docker container is published. + # We can now trigger the cnquery bump in cnspec, which will also trigger the release of cnspec. + # The docker container is a pre-requisite for cnspec release. + - name: Trigger cnquery bump in cnspec + if: ${{ ! steps.skip-publish.outputs.skip-publish }} + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.RELEASR_ACTION_TOKEN }} + repository: "mondoohq/cnspec" + event-type: update-cnquery + client-payload: '{ + "version": "${{ github.ref_name }}" + }' + - name: Cleanup if: always() run: