Skip to content

Commit 1643153

Browse files
authored
pin actions (#32)
1 parent 8f2855d commit 1643153

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,36 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616
with:
1717
fetch-depth: 0
1818

1919
- name: Install Go
20-
uses: actions/setup-go@v5
20+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
2121
with:
2222
go-version-file: go.mod
2323

2424
- name: Run linters
25-
uses: golangci/golangci-lint-action@v6
25+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
2626
with:
27-
version: v1.64.7
2827
problem-matchers: true
29-
args: --issues-exit-code=0 --out-format=sarif > linter-results.sarif # we expect some findings, but for this demo just continue
28+
args: --issues-exit-code=0 --output.sarif.path linter-results.sarif # we expect some findings, but for this demo just continue
3029

3130
- name: Upload SARIF to Code Scanning
32-
uses: github/codeql-action/upload-sarif@v3
31+
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
3332
with:
3433
sarif_file: ./linter-results.sarif
3534

3635
test:
3736
runs-on: ubuntu-latest
3837
steps:
3938
- name: Checkout code
40-
uses: actions/checkout@v4
39+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4140
with:
4241
fetch-depth: 0
4342

4443
- name: Install Go
45-
uses: actions/setup-go@v5
44+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
4645
with:
4746
go-version-file: go.mod
4847

@@ -55,7 +54,7 @@ jobs:
5554
run: go test -v -covermode=count -coverprofile=coverage.out
5655

5756
- name: Coveralls
58-
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b #2.3.6
57+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
5958
with:
6059
github-token: ${{ secrets.github_token }}
6160
file: coverage.out

.github/workflows/upload_assets.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919
with:
2020
fetch-depth: 0
2121

2222
- name: Install Go
23-
uses: actions/setup-go@v5
23+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
2424
with:
2525
go-version-file: go.mod
2626

2727
- name: Run GoReleaser
28-
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 #v6
28+
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
2929
with:
3030
version: v2
3131
args: release --clean
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434

3535
- name: Upload binary artifact
36-
uses: actions/upload-artifact@v4
36+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3737
with:
3838
name: binary
3939
path: dist/go-ci-demo_linux_amd64_v1/${{ env.BINARY }}
@@ -49,26 +49,26 @@ jobs:
4949
runs-on: ubuntu-latest
5050
steps:
5151
- name: Checkout code
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5353
with:
5454
fetch-depth: 0
5555

5656
- name: Set up Docker Buildx
57-
uses: docker/setup-buildx-action@v3
57+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
5858
with:
5959
driver-opts: image=moby/buildkit:latest
6060
#buildkitd-flags: --debug
6161

6262
- name: Log in to the Container registry
63-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
63+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
6464
with:
6565
registry: ${{ env.REGISTRY }}
6666
username: ${{ github.actor }}
6767
password: ${{ secrets.GITHUB_TOKEN }}
6868

6969
# Download the binary artifact from the build job
7070
- name: Download binary artifact
71-
uses: actions/download-artifact@v4
71+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
7272
with:
7373
name: binary
7474
path: ./docker-build
@@ -85,7 +85,7 @@ jobs:
8585
echo "tag=$TAG" >> $GITHUB_OUTPUT
8686
8787
- name: Build and push Docker image
88-
uses: docker/build-push-action@v5
88+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
8989
with:
9090
context: ./docker-build
9191
build-args: |
@@ -99,7 +99,7 @@ jobs:
9999

100100
- name: Tag and push latest
101101
if: steps.tag.outputs.tag != 'v99.9.9'
102-
uses: docker/build-push-action@v5
102+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
103103
with:
104104
context: ./docker-build
105105
build-args: |

0 commit comments

Comments
 (0)