Skip to content

Commit 686d7f1

Browse files
committed
use path anker in workflow yaml
1 parent 1ae3354 commit 686d7f1

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/go.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@ name: CI
22
on:
33
push:
44
branches: ["main", "devel"]
5-
paths:
5+
paths: &paths
66
- 'go.mod'
77
- '**.go'
88
- '**.yml'
99
- '**.yaml'
1010
pull_request:
1111
branches: ["main", "devel"]
12-
paths:
13-
- 'go.mod'
14-
- '**.go'
15-
- '**.yml'
16-
- '**.yaml'
12+
paths: *paths
1713

1814
permissions:
1915
contents: read
@@ -25,9 +21,10 @@ jobs:
2521
runs-on: ubuntu-latest
2622
steps:
2723
- uses: actions/checkout@v5
28-
- uses: actions/setup-go@v6
2924
with:
3025
persist-credentials: false
26+
- uses: actions/setup-go@v6
27+
with:
3128
go-version-file: go.mod
3229
cache: true
3330
- run: go test -v ./...
@@ -36,9 +33,10 @@ jobs:
3633
runs-on: ubuntu-latest
3734
steps:
3835
- uses: actions/checkout@v5
39-
- uses: actions/setup-go@v6
4036
with:
4137
persist-credentials: false
38+
- uses: actions/setup-go@v6
39+
with:
4240
go-version-file: go.mod
4341
cache: true
4442

0 commit comments

Comments
 (0)