Skip to content

Commit 2cf0851

Browse files
Richard87Copilot
andcommitted
chore: harden github actions with actions-hardify
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 89df1b0 commit 2cf0851

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

.github/workflows/pr.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,33 @@ jobs:
1111
name: Build
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v6
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1515
- name: Build docker image
1616
run: docker build .
1717

1818
lint:
1919
name: Lint
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
with:
2424
fetch-depth: 2
25-
- uses: actions/setup-go@v5
25+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2626
with:
2727
go-version-file: 'go.mod'
2828
- name: golangci-lint
29-
uses: golangci/golangci-lint-action@v6
29+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
3030
with:
3131
version: v1.61.0
3232

3333
test:
3434
name: Test
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@v6
37+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3838
with:
3939
fetch-depth: 2
40-
- uses: actions/setup-go@v5
40+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
4141
with:
4242
go-version-file: 'go.mod'
4343
- run: go test ./...

.github/workflows/release-please.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
release_created: ${{steps.release.outputs.release_created }}
2020

2121
steps:
22-
- uses: actions/checkout@v6
23-
- uses: googleapis/release-please-action@v4
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
2424
id: release
2525

2626
release-container:
@@ -31,20 +31,20 @@ jobs:
3131
IMAGE_NAME: ${{ github.repository }}
3232
TAG: ${{ needs.release-please.outputs.version }}
3333
steps:
34-
- uses: actions/checkout@v6
34+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3535

3636
- name: Set up Docker Buildx
37-
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd
37+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
3838

3939
- name: Log in to the Container registry
40-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2
40+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
4141
with:
4242
registry: ${{ env.REGISTRY }}
4343
username: ${{ github.actor }}
4444
password: ${{ secrets.GITHUB_TOKEN }}
4545

4646
- name: Build and push Docker image
47-
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
47+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
4848
if: ${{needs.release-please.outputs.release_created == 'true'}}
4949
with:
5050
context: .
@@ -60,14 +60,14 @@ jobs:
6060
- name: Extract metadata (tags, labels) for Docker
6161
id: meta
6262
if: ${{ needs.release-please.outputs.release_created != 'true' }}
63-
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf
63+
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
6464
with:
6565
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6666
tags: |
6767
type=raw,value=latest-{{date 'YYYYMMDDHHmmss'}}-{{sha}}
6868
6969
- name: Build and push Docker image
70-
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
70+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
7171
if: ${{ needs.release-please.outputs.release_created != 'true' }}
7272
with:
7373
context: .
@@ -85,7 +85,7 @@ jobs:
8585
needs: release-please
8686
if: ${{needs.release-please.outputs.release_created == 'true'}}
8787
steps:
88-
- uses: actions/checkout@v6
88+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8989
with:
9090
fetch-depth: 0 # important parameter
9191

@@ -95,12 +95,12 @@ jobs:
9595
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
9696
9797
- name: Install Helm
98-
uses: azure/setup-helm@v4
98+
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
9999
env:
100100
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
101101

102102
- name: Run chart-releaser
103-
uses: helm/chart-releaser-action@v1.6.0
103+
uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0
104104
env:
105105
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
106106
skip_existing: true

0 commit comments

Comments
 (0)