From a159ffdba7835011abc8c6369e07dd4a52010bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 5 Apr 2023 09:41:48 +0200 Subject: [PATCH] gha: ci-on-push: Depend on Commit Message Check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's make this workflow dependent of the commit message check, and only start it if the commit message check one passes. As a side effect, this allows us to run this specific workflow using secrets, without having to rely on `pull_request_target`. Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/ci-on-push.yaml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-on-push.yaml b/.github/workflows/ci-on-push.yaml index cbab268372..37f4b5080d 100644 --- a/.github/workflows/ci-on-push.yaml +++ b/.github/workflows/ci-on-push.yaml @@ -1,21 +1,19 @@ name: Kata Containers CI on: - pull_request_target: + workflow_run: + workflows: + - Commit Message Check types: - - opened - - reopened - - labeled - - synchronize + - completed jobs: build-kata-static-tarball-amd64: - if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') + if: ${{ github.event.workflow_run.conclusion == 'success' }} uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml with: tarball-suffix: -${{ github.event.pull_request.number}}-${{ github.sha }} publish-kata-deploy-payload-amd64: - if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') needs: build-kata-static-tarball-amd64 uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml with: @@ -27,7 +25,6 @@ jobs: secrets: inherit run-k8s-tests-on-aks: - if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') needs: publish-kata-deploy-payload-amd64 uses: ./.github/workflows/run-k8s-tests-on-aks.yaml with: