Skip to content

Commit bebfe7e

Browse files
committed
refactor(ci): only run go jobs on go changes
1 parent b67296c commit bebfe7e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/coder.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
# - '.github/**'
6969
sh:
7070
- "**.sh"
71+
go:
72+
- "**.go"
7173
ts:
7274
- 'site/**'
7375
k8s:
@@ -92,6 +94,8 @@ jobs:
9294
name: style/lint/golangci
9395
timeout-minutes: 5
9496
runs-on: ubuntu-latest
97+
needs: changes
98+
if: needs.changes.outputs.go == 'true'
9599
steps:
96100
- uses: actions/checkout@v3
97101
- uses: actions/setup-go@v3
@@ -284,6 +288,8 @@ jobs:
284288
name: "test/go"
285289
runs-on: ${{ matrix.os }}
286290
timeout-minutes: 20
291+
needs: changes
292+
if: needs.changes.outputs.go == 'true'
287293
strategy:
288294
matrix:
289295
os:
@@ -368,6 +374,8 @@ jobs:
368374
# goroutines. Setting this to the timeout +5m should work quite well
369375
# even if some of the preceding steps are slow.
370376
timeout-minutes: 25
377+
needs: changes
378+
if: needs.changes.outputs.go == 'true'
371379
steps:
372380
- uses: actions/checkout@v3
373381

0 commit comments

Comments
 (0)