Skip to content

Commit 59456ad

Browse files
committed
ci: pinned github actions used with their sha...
... and let dependabot deal with that. NOTE: dependabot updates for the github actions ecosystem are automatically merged. Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent 2510644 commit 59456ad

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.github/dependabot.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
version: 2
2+
assignees:
3+
- fredbi
24
updates:
35
- package-ecosystem: "github-actions"
46
directories:
@@ -30,7 +32,8 @@ updates:
3032
# 2. golang.org-dependencies are auto-merged
3133
# 3. go-openapi patch updates are auto-merged. Minor/major version updates require a manual merge.
3234
# 4. other dependencies require a manual merge
33-
directory: "/"
35+
directories:
36+
- "**/*"
3437
schedule:
3538
interval: "weekly"
3639
day: "friday"
@@ -39,6 +42,7 @@ updates:
3942
development-dependencies:
4043
patterns:
4144
- "github.com/stretchr/testify"
45+
- "github.com/go-openapi/testify"
4246

4347
golang-org-dependencies:
4448
patterns:
@@ -47,9 +51,14 @@ updates:
4751
go-openapi-dependencies:
4852
patterns:
4953
- "github.com/go-openapi/*"
54+
exclude-patterns:
55+
- "github.com/go-openapi/testify"
5056

5157
other-dependencies:
5258
exclude-patterns:
5359
- "github.com/go-openapi/*"
5460
- "github.com/stretchr/testify"
61+
- "github.com/go-openapi/testify"
5562
- "golang.org/*"
63+
allow:
64+
- dependency-type: all

.github/workflows/auto-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- name: Dependabot metadata
1414
id: metadata
15-
uses: dependabot/fetch-metadata@v2
15+
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
1616

1717
- name: Auto-approve all dependabot PRs
1818
run: gh pr review --approve "$PR_URL"

.github/workflows/go-test.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
modules: ${{ steps.modules.outputs.modules }}
2323

2424
steps:
25-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2626
- name: Find go modules
2727
id: modules
2828
shell: bash
@@ -69,15 +69,15 @@ jobs:
6969
module: ${{ fromJSON(needs.module-matrix.outputs.modules) }}
7070

7171
steps:
72-
- uses: actions/checkout@v5
73-
- uses: actions/setup-go@v6
72+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
73+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
7474
with:
7575
go-version: stable
7676
check-latest: true
7777
cache: true
7878
cache-dependency-path: '**/go.sum'
7979
- name: golangci-lint
80-
uses: golangci/golangci-lint-action@v8
80+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
8181
with:
8282
version: latest
8383
only-new-issues: true
@@ -107,8 +107,8 @@ jobs:
107107
TEST_REPORT: 'all_modules.report.${{ matrix.os }}.${{ matrix.go_version }}.json'
108108

109109
steps:
110-
- uses: actions/checkout@v5
111-
- uses: actions/setup-go@v6
110+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
111+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
112112
with:
113113
go-version: '${{ matrix.go_version }}'
114114
check-latest: true
@@ -140,7 +140,7 @@ jobs:
140140
141141
- name: Upload coverage to codecov
142142
if: ${{ success() }} # we do this only if all previous steps succeeded
143-
uses: codecov/codecov-action@v5
143+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
144144
with:
145145
name: Multi modules aggregated coverage
146146
flags: '${{ matrix.go_version }}-${{ matrix.os }}'
@@ -149,7 +149,7 @@ jobs:
149149

150150
- name: Upload JSON test Results
151151
if: always()
152-
uses: actions/upload-artifact@v4
152+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
153153
with:
154154
name: 'all_modules.report.${{ matrix.os }}.${{ matrix.go_version }}'
155155
path: ${{ env.TEST_REPORT }}
@@ -169,14 +169,14 @@ jobs:
169169
name: Collect and merge test reports
170170
runs-on: ubuntu-latest
171171
steps:
172-
- uses: actions/setup-go@v6
172+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
173173
with:
174174
go-version: stable
175175
check-latest: true
176176
cache: true
177177

178178
- name: Download all JSON artifacts
179-
uses: actions/download-artifact@v5
179+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
180180
with:
181181
run-id: "${{ github.run_id }}"
182182
pattern: "all_modules.report.*"
@@ -194,7 +194,7 @@ jobs:
194194
195195
- name: Upload test results to Codecov
196196
if: always()
197-
uses: codecov/codecov-action@v5
197+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
198198
with:
199199
files: '**/junit_report.xml'
200200
report_type: 'test_results'
@@ -204,7 +204,7 @@ jobs:
204204

205205
- name: Convert test reports to CTRF JSON
206206
run: |
207-
go install github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter@latest
207+
go install github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter@v0.0.10
208208
209209
appName="swag"
210210
buildNumber="${{ github.run_id }}"
@@ -244,7 +244,7 @@ jobs:
244244
#
245245
# They also handle the storage of past test reports, so as to assess flaky tests.
246246
- name: Publish Test Summary Results
247-
uses: ctrf-io/github-test-reporter@v1
247+
uses: ctrf-io/github-test-reporter@646f98cfc16c6f7a0e1f6100cabe2deb95dd2eef # v1.0.22
248248
with:
249249
report-path: 'reports/ctrf_report_*.json'
250250
use-suite-name: true

0 commit comments

Comments
 (0)