From 19d9fd9eb17bc0710565d8c04fc1c33c829b3deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 11 Sep 2023 20:41:01 +0200 Subject: [PATCH] ci: Add more target-branch related fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ones for the payload-after-push.yamland ci-nightly.yaml are not that much important right now, but they're needed for when we start running those on stable branches as well. The other ones were missed during bd24afcf737f94481992e2d88b27e66cfae64df8. Fixes: #7414 Signed-off-by: Fabiano FidĂȘncio (cherry picked from commit 6d795c089eb6716d5c4a99af0a067b068d56bd64) --- .github/workflows/ci-nightly.yaml | 1 + .github/workflows/payload-after-push.yaml | 6 ++++++ .../workflows/publish-kata-deploy-payload-amd64.yaml | 4 ++++ .../workflows/publish-kata-deploy-payload-arm64.yaml | 11 +++++++++++ .../workflows/publish-kata-deploy-payload-s390x.yaml | 11 +++++++++++ 5 files changed, 33 insertions(+) diff --git a/.github/workflows/ci-nightly.yaml b/.github/workflows/ci-nightly.yaml index 5c76767106..da763e392f 100644 --- a/.github/workflows/ci-nightly.yaml +++ b/.github/workflows/ci-nightly.yaml @@ -15,4 +15,5 @@ jobs: commit-hash: ${{ github.sha }} pr-number: "nightly" tag: ${{ github.sha }}-nightly + target-branch: $GITHUB_REF_NAME secrets: inherit diff --git a/.github/workflows/payload-after-push.yaml b/.github/workflows/payload-after-push.yaml index 46766c54b3..d0bf1dd8f7 100644 --- a/.github/workflows/payload-after-push.yaml +++ b/.github/workflows/payload-after-push.yaml @@ -15,6 +15,7 @@ jobs: with: commit-hash: ${{ github.sha }} push-to-registry: yes + target-branch: $GITHUB_REF_NAME secrets: inherit build-assets-arm64: @@ -22,6 +23,7 @@ jobs: with: commit-hash: ${{ github.sha }} push-to-registry: yes + target-branch: $GITHUB_REF_NAME secrets: inherit build-assets-s390x: @@ -29,6 +31,7 @@ jobs: with: commit-hash: ${{ github.sha }} push-to-registry: yes + target-branch: $GITHUB_REF_NAME secrets: inherit publish-kata-deploy-payload-amd64: @@ -39,6 +42,7 @@ jobs: registry: quay.io repo: kata-containers/kata-deploy-ci tag: kata-containers-amd64 + target-branch: $GITHUB_REF_NAME secrets: inherit publish-kata-deploy-payload-arm64: @@ -49,6 +53,7 @@ jobs: registry: quay.io repo: kata-containers/kata-deploy-ci tag: kata-containers-arm64 + target-branch: $GITHUB_REF_NAME secrets: inherit publish-kata-deploy-payload-s390x: @@ -59,6 +64,7 @@ jobs: registry: quay.io repo: kata-containers/kata-deploy-ci tag: kata-containers-s390x + target-branch: $GITHUB_REF_NAME secrets: inherit publish-manifest: diff --git a/.github/workflows/publish-kata-deploy-payload-amd64.yaml b/.github/workflows/publish-kata-deploy-payload-amd64.yaml index 8b15a06b58..253b93fbcb 100644 --- a/.github/workflows/publish-kata-deploy-payload-amd64.yaml +++ b/.github/workflows/publish-kata-deploy-payload-amd64.yaml @@ -17,6 +17,10 @@ on: commit-hash: required: false type: string + target-branch: + required: false + type: string + default: "" jobs: kata-payload: diff --git a/.github/workflows/publish-kata-deploy-payload-arm64.yaml b/.github/workflows/publish-kata-deploy-payload-arm64.yaml index 6c35ed8a31..0bdf909f16 100644 --- a/.github/workflows/publish-kata-deploy-payload-arm64.yaml +++ b/.github/workflows/publish-kata-deploy-payload-arm64.yaml @@ -17,6 +17,10 @@ on: commit-hash: required: false type: string + target-branch: + required: false + type: string + default: "" jobs: kata-payload: @@ -29,6 +33,13 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ inputs.commit-hash }} + fetch-depth: 0 + + - name: Rebase atop of the latest target branch + run: | + ./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch" + env: + TARGET_BRANCH: ${{ inputs.target-branch }} - name: get-kata-tarball uses: actions/download-artifact@v3 diff --git a/.github/workflows/publish-kata-deploy-payload-s390x.yaml b/.github/workflows/publish-kata-deploy-payload-s390x.yaml index ee7fa3fd78..6d1d44f7b7 100644 --- a/.github/workflows/publish-kata-deploy-payload-s390x.yaml +++ b/.github/workflows/publish-kata-deploy-payload-s390x.yaml @@ -17,6 +17,10 @@ on: commit-hash: required: false type: string + target-branch: + required: false + type: string + default: "" jobs: kata-payload: @@ -29,6 +33,13 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ inputs.commit-hash }} + fetch-depth: 0 + + - name: Rebase atop of the latest target branch + run: | + ./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch" + env: + TARGET_BRANCH: ${{ inputs.target-branch }} - name: get-kata-tarball uses: actions/download-artifact@v3