From a8db18743cb4b5c0f67475ff56825e83f3e3400d Mon Sep 17 00:00:00 2001 From: Ivan Valdes Date: Sat, 3 Aug 2024 22:08:37 -0700 Subject: [PATCH] github/workflows: prevent arm64 workloads to run on forks User forks don't have access to ARM64 runners, which makes the jobs fail after a timeout. Signed-off-by: Ivan Valdes --- .github/workflows/test_template.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_template.yaml b/.github/workflows/test_template.yaml index 0a12758a..f82d6492 100644 --- a/.github/workflows/test_template.yaml +++ b/.github/workflows/test_template.yaml @@ -1,5 +1,5 @@ name: Workflow Test Template -on: +on: workflow_call: inputs: runs-on: @@ -15,6 +15,8 @@ permissions: read-all jobs: run: runs-on: ${{ inputs.runs-on }} + # this is to prevent arm64 jobs from running at forked projects + if: inputs.arch != 'arm64' || github.repository == 'etcd-io/raft' strategy: fail-fast: false matrix: @@ -26,7 +28,7 @@ jobs: - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: ${{ steps.goversion.outputs.goversion }} - - env: + - env: TARGET: ${{ matrix.target }} run: | go clean -testcache