Skip to content

Commit e3db434

Browse files
authored
Merge pull request #21 from thaJeztah/bump_gha
ci: update actions to current versions, golangci-lint v2, test against latest go versions
2 parents 8c942b0 + f0f7bf2 commit e3db434

File tree

5 files changed

+38
-19
lines changed

5 files changed

+38
-19
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ concurrency:
66

77
on:
88
schedule:
9+
# ┌───────────── minute (0 - 59)
10+
# │ ┌───────────── hour (0 - 23)
11+
# │ │ ┌───────────── day of the month (1 - 31)
12+
# │ │ │ ┌───────────── month (1 - 12)
13+
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
14+
# │ │ │ │ │
15+
# │ │ │ │ │
16+
# │ │ │ │ │
17+
# * * * * *
918
- cron: '0 12 * * 6'
1019
push:
1120
branches:
@@ -14,6 +23,10 @@ on:
1423
tags:
1524
- 'v*'
1625
pull_request:
26+
# The branches below must be a subset of the branches above
27+
branches:
28+
- 'main'
29+
- 'release/*'
1730

1831
permissions:
1932
contents: read # to fetch code (actions/checkout)
@@ -44,12 +57,12 @@ jobs:
4457
git checkout HEAD^2
4558
-
4659
name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
60+
uses: github/codeql-action/init@v3
4861
with:
4962
languages: ${{ matrix.language }}
5063
-
5164
name: Autobuild
52-
uses: github/codeql-action/autobuild@v2
65+
uses: github/codeql-action/autobuild@v3
5366
-
5467
name: Perform CodeQL Analysis
55-
uses: github/codeql-action/analyze@v2
68+
uses: github/codeql-action/analyze@v3

.github/workflows/fossa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
uses: actions/checkout@v4
2121

2222
- name: Run FOSSA scan and upload build data
23-
uses: fossa-contrib/fossa-action@v2
23+
uses: fossa-contrib/fossa-action@v3
2424
with:
2525
fossa-api-key: cac3dc8d4f2ba86142f6c0f2199a160f

.github/workflows/test.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ jobs:
1717
build:
1818
strategy:
1919
matrix:
20-
go-version: [1.21.x, 1.22.x]
20+
go-version:
21+
- 1.21.x # oldest supported (see go.mod)
22+
- oldstable
23+
- stable
2124
os: [ubuntu-latest, windows-latest, macos-latest]
2225
runs-on: ${{ matrix.os }}
2326
timeout-minutes: 10
@@ -34,16 +37,16 @@ jobs:
3437
make build
3538
3639
- name: lint
37-
uses: golangci/golangci-lint-action@v6
40+
uses: golangci/golangci-lint-action@v7
3841
with:
39-
version: v1.59
42+
version: v2.0
4043
args: --print-resources-usage --timeout=10m --verbose
4144

4245
- name: Test
4346
run: |
4447
make coverage
4548
4649
- name: Codecov
47-
uses: codecov/codecov-action@v4
50+
uses: codecov/codecov-action@v5
4851
with:
4952
directory: ./

.golangci.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1+
version: "2"
12
linters:
23
enable:
34
- bodyclose
4-
- dupword # Checks for duplicate words in the source code
5-
- gofmt
6-
- goimports
7-
- ineffassign
5+
- dupword
86
- misspell
97
- revive
10-
- staticcheck
118
- unconvert
12-
- unused
13-
- vet
149
disable:
1510
- errcheck
16-
17-
run:
18-
deadline: 2m
11+
exclusions:
12+
generated: disable
13+
presets:
14+
- comments
15+
- std-error-handling
16+
formatters:
17+
enable:
18+
- gofmt
19+
- goimports
20+
exclusions:
21+
generated: disable

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/distribution/reference
22

3-
go 1.20
3+
go 1.21
44

55
require github.com/opencontainers/go-digest v1.0.0

0 commit comments

Comments
 (0)