Skip to content

Commit a2c0537

Browse files
committed
ci: update CI workflows and dependencies
- Standardize cron syntax to use double quotes in codeql.yml - Update CodeQL action to version 3 in codeql.yml - Standardize Go version syntax to use double quotes in go.yml - Update golangci-lint-action to version 4 in go.yml - Update actions/cache to version 4 in go.yml - Update codecov-action to version 4 in go.yml - Standardize wildcard syntax to use double quotes in goreleaser.yml - Remove unnecessary newlines in goreleaser.yml - Update Go version to use semver range in goreleaser.yml Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent ad67ad1 commit a2c0537

File tree

3 files changed

+27
-30
lines changed

3 files changed

+27
-30
lines changed

.github/workflows/codeql.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [master]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [master]
2020
schedule:
21-
- cron: '41 23 * * 6'
21+
- cron: "41 23 * * 6"
2222

2323
jobs:
2424
analyze:
@@ -32,23 +32,23 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'go' ]
35+
language: ["go"]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3737
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3838

3939
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v4
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
4242

43-
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v3
46-
with:
47-
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v3
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5252

53-
- name: Perform CodeQL Analysis
54-
uses: github/codeql-action/analyze@v2
53+
- name: Perform CodeQL Analysis
54+
uses: github/codeql-action/analyze@v3

.github/workflows/go.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
- name: Setup go
1616
uses: actions/setup-go@v5
1717
with:
18-
go-version: '^1.16'
18+
go-version: "^1.16"
1919
- name: Checkout repository
2020
uses: actions/checkout@v4
2121
- name: Setup golangci-lint
22-
uses: golangci/golangci-lint-action@v3
22+
uses: golangci/golangci-lint-action@v4
2323
with:
2424
args: --verbose
2525
test:
2626
strategy:
2727
matrix:
2828
os: [ubuntu-latest]
29-
go: [1.14, 1.15, 1.16, 1.17, 1.18, 1.19, '1.20']
29+
go: [1.14, 1.15, 1.16, 1.17, 1.18, 1.19, "1.20"]
3030
include:
3131
- os: ubuntu-latest
3232
go-build: ~/.cache/go-build
@@ -48,7 +48,7 @@ jobs:
4848
with:
4949
ref: ${{ github.ref }}
5050

51-
- uses: actions/cache@v3
51+
- uses: actions/cache@v4
5252
with:
5353
path: |
5454
${{ matrix.go-build }}
@@ -61,6 +61,6 @@ jobs:
6161
go test -v -covermode=atomic -coverprofile=coverage.out
6262
6363
- name: Upload coverage to Codecov
64-
uses: codecov/codecov-action@v3
64+
uses: codecov/codecov-action@v4
6565
with:
6666
flags: ${{ matrix.os }},go-${{ matrix.go }}

.github/workflows/goreleaser.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Goreleaser
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

88
permissions:
99
contents: write
@@ -12,18 +12,15 @@ jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
-
16-
name: Checkout
15+
- name: Checkout
1716
uses: actions/checkout@v4
1817
with:
1918
fetch-depth: 0
20-
-
21-
name: Set up Go
19+
- name: Set up Go
2220
uses: actions/setup-go@v5
2321
with:
24-
go-version: 1.17
25-
-
26-
name: Run GoReleaser
22+
go-version: "^1"
23+
- name: Run GoReleaser
2724
uses: goreleaser/goreleaser-action@v5
2825
with:
2926
# either 'goreleaser' (default) or 'goreleaser-pro'

0 commit comments

Comments
 (0)