Skip to content

Commit

Permalink
github/workflows: prevent arm64 workloads to run on forks
Browse files Browse the repository at this point in the history
User forks don't have access to ARM64 runners, which makes the jobs fail
after a timeout.

Signed-off-by: Ivan Valdes <[email protected]>
  • Loading branch information
ivanvc committed Aug 4, 2024
1 parent 90a5917 commit a8db187
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test_template.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Workflow Test Template
on:
on:
workflow_call:
inputs:
runs-on:
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit a8db187

Please sign in to comment.