66 pull_request :
77 branches : [main, master, develop]
88
9+ permissions :
10+ contents : write
11+
912jobs :
1013 CI :
1114 runs-on : ubuntu-latest
1215 steps :
13- - uses : actions/checkout@v3
16+ - uses : actions/checkout@v6
1417 with :
1518 persist-credentials : false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
1619 fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
1720
18- - uses : actions/setup-go@v2
21+ - uses : actions/setup-go@v6
1922 with :
20- go-version : ' 1.18 '
23+ go-version-file : go.mod
2124
2225 - name : Verify dependencies
2326 run : |
24- go get -v -t ./...
2527 go mod verify
2628
29+ - name : Validate module graph
30+ run : |
31+ go mod tidy
32+ git diff --exit-code go.mod go.sum
33+
2734 - name : Build
2835 run : make build
2936
@@ -35,15 +42,15 @@ jobs:
3542 sudo swapon -s
3643
3744 - name : Test
38- run : make test_coverage
45+ run : make test
3946
4047 - name : Go Coverage Badge # Pass the `coverage.out` output to this action
41- uses : tj-actions/coverage-badge-go@v1.2
48+ uses : tj-actions/coverage-badge-go@v3
4249 with :
4350 filename : coverage.out
4451
4552 - name : Verify changed files
46- uses : tj-actions/verify-changed-files@v9.1
53+ uses : tj-actions/verify-changed-files@v20
4754 id : verify-changed-files
4855 with :
4956 files : README.md
5865
5966 - name : Push changes
6067 if : steps.verify-changed-files.outputs.files_changed == 'true'
61- uses : ad-m/github-push-action@master
68+ uses : ad-m/github-push-action@v1.0.0
6269 with :
6370 github_token : ${{ github.token }}
64- branch : ${{ github.head_ref }}
71+ branch : ${{ github.head_ref || github.ref_name }}
0 commit comments