File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11on :
22 pull_request :
33
4+ permissions :
5+ contents : read
6+
47jobs :
58 build-and-scan :
69 runs-on : ubuntu-latest
710 steps :
8- - uses : actions/checkout@master
11+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
912 - run : docker build . -t ${{ github.sha }}
10- - uses : Azure/container-scan@v0
13+ - name : Run Trivy vulnerability scanner
14+ uses : aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
1115 with :
12- image-name : ${{ github.sha }}
13- severity-threshold : CRITICAL
14- env :
15- TRIVY_IGNORE_UNFIXED : true
16- DOCKLE_HOST : " unix:///var/run/docker.sock"
16+ image-ref : ${{ github.sha }}
17+ severity : CRITICAL
18+ ignore-unfixed : true
19+ exit-code : ' 1'
Original file line number Diff line number Diff line change 66 - ' v*'
77 pull_request :
88
9+ permissions :
10+ contents : write
11+ packages : write
12+
913jobs :
1014 build-and-release :
1115 runs-on : ubuntu-latest
1216 env :
1317 DOCKER_CLI_EXPERIMENTAL : " enabled"
1418 steps :
15- - uses : actions/checkout@master
19+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1620 with :
1721 fetch-depth : 0
18- - uses : actions/setup-go@v5
22+ - uses : actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
1923 with :
2024 go-version-file : ' go.mod'
21- - uses : actions/cache@v3.2.2
22- with :
23- path : ~/go/pkg/mod
24- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
25- restore-keys : |
26- ${{ runner.os }}-go-
2725 - run : |
2826 go test ./...
2927 env:
3028 CGO_ENABLED: 0
3129 - name : Login to docker.io registry
32- uses : docker/login-action@v1
30+ uses : docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
3331 with :
3432 username : ${{ secrets.DOCKER_USERNAME }}
3533 password : ${{ secrets.DOCKER_PASSWORD }}
3634 - name : Login to ghcr.io registry
37- uses : docker/login-action@v1
35+ uses : docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
3836 with :
3937 registry : ghcr.io
4038 username : goodwithtech
4139 password : ${{ secrets.GH_PAT }}
4240 -
4341 name : Run GoReleaser
4442 if : success() && startsWith(github.ref, 'refs/tags/v')
45- uses : goreleaser/goreleaser-action@v2
43+ uses : goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
4644 with :
4745 distribution : goreleaser
4846 version : " ~> v2"
5351 name : Clear
5452 if : always() && startsWith(github.ref, 'refs/tags/v')
5553 run : |
56- rm -f ${HOME}/.docker/config.json
54+ rm -f ${HOME}/.docker/config.json
You can’t perform that action at this time.
0 commit comments