refactor(ci): only run go jobs on go changes

This commit is contained in:
Joe Previte
2022-09-28 16:35:19 +00:00
parent b67296c0a4
commit bebfe7eabd
+8
View File
@@ -68,6 +68,8 @@ jobs:
# - '.github/**'
sh:
- "**.sh"
go:
- "**.go"
ts:
- 'site/**'
k8s:
@@ -92,6 +94,8 @@ jobs:
name: style/lint/golangci
timeout-minutes: 5
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.go == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
@@ -284,6 +288,8 @@ jobs:
name: "test/go"
runs-on: ${{ matrix.os }}
timeout-minutes: 20
needs: changes
if: needs.changes.outputs.go == 'true'
strategy:
matrix:
os:
@@ -368,6 +374,8 @@ jobs:
# goroutines. Setting this to the timeout +5m should work quite well
# even if some of the preceding steps are slow.
timeout-minutes: 25
needs: changes
if: needs.changes.outputs.go == 'true'
steps:
- uses: actions/checkout@v3