From 3a760a157a05a38327468b92e2c3c1b30283b303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 5 Apr 2023 10:24:31 +0200 Subject: [PATCH] gha: ci-on-push: Adjust to using workflow_run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The way previously used to get the PR's commit sha can only be used with `pull_request*` kind of events. Let's adapt it to the `workflow_run` now that we're using it. With this change we ended up dropping the PR number from the tarball suffix, as that's not straightforward to get and, to be honest, not a unique differentiator that would justify the effort. Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/ci-on-push.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-on-push.yaml b/.github/workflows/ci-on-push.yaml index 37f4b5080..940be3a60 100644 --- a/.github/workflows/ci-on-push.yaml +++ b/.github/workflows/ci-on-push.yaml @@ -11,16 +11,16 @@ jobs: 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 }} + tarball-suffix: -${{ github.event.workflow_run.head_sha }} publish-kata-deploy-payload-amd64: needs: build-kata-static-tarball-amd64 uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml with: - tarball-suffix: -${{ github.event.pull_request.number}}-${{ github.sha }} + tarball-suffix: -${{ github.event.workflow_run.head_sha }} registry: ghcr.io repo: ${{ github.repository_owner }}/kata-deploy-ci - tag: ${{ github.event.pull_request.number }}-${{ github.sha }}-amd64 + tag: ${{ github.event.workflow_run.head_sha }}-amd64 quay-io-login-continue-on-error: true secrets: inherit @@ -30,5 +30,5 @@ jobs: with: registry: ghcr.io repo: ${{ github.repository_owner }}/kata-deploy-ci - tag: ${{ github.event.pull_request.number }}-${{ github.sha }}-amd64 + tag: ${{ github.event.workflow_run.head_sha }}-amd64 secrets: inherit