From 9b8cc4581d023e2f54829147d3aa7281acfcd135 Mon Sep 17 00:00:00 2001 From: Snir Sheriber Date: Mon, 12 Jul 2021 14:34:44 +0300 Subject: [PATCH] ci: static checks: use defined target_branch Fixes: #2214 Signed-off-by: Snir Sheriber --- .github/workflows/static-checks.yaml | 2 +- ci/lib.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static-checks.yaml b/.github/workflows/static-checks.yaml index 9b8af9c53b..882682bdee 100644 --- a/.github/workflows/static-checks.yaml +++ b/.github/workflows/static-checks.yaml @@ -13,7 +13,7 @@ jobs: TRAVIS_PULL_REQUEST_BRANCH: ${{ github.head_ref }} TRAVIS_PULL_REQUEST_SHA : ${{ github.event.pull_request.head.sha }} RUST_BACKTRACE: "1" - target_branch: ${TRAVIS_BRANCH} + target_branch: ${{ github.base_ref }} steps: - name: Install Go uses: actions/setup-go@v2 diff --git a/ci/lib.sh b/ci/lib.sh index de816a4a5c..1d9aa4b167 100644 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -5,7 +5,7 @@ export tests_repo="${tests_repo:-github.com/kata-containers/tests}" export tests_repo_dir="$GOPATH/src/$tests_repo" -export branch="${branch:-main}" +export branch="${target_branch:-main}" # Clones the tests repository and checkout to the branch pointed out by # the global $branch variable.