Skip to content

Commit 2365bc7

Browse files
committed
chore: update workflows for Go and CodeQL
- Fix a typo in the cron expression for the codeql.yml workflow - Update the language value to "go" in the codeql.yml workflow - Update the version of actions/checkout in the codeql.yml workflow - Update the version of actions/setup-go in the go.yml workflow - Update the go-version value to "^1" in the go.yml workflow - Update the version of actions/checkout in the go.yml workflow - Update the version of actions/setup-go in the goreleaser.yml workflow - Update the version of goreleaser/goreleaser-action in the goreleaser.yml workflow Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent a9ac206 commit 2365bc7

File tree

3 files changed

+31
-34
lines changed

3 files changed

+31
-34
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@v3
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@v2
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@v2
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@v2

.github/workflows/go.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Setup go
16-
uses: actions/setup-go@v3
16+
uses: actions/setup-go@v4
1717
with:
18-
go-version: '^1.16'
18+
go-version: "^1"
1919
- name: Checkout repository
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
- name: Setup golangci-lint
2222
uses: golangci/golangci-lint-action@v3
2323
with:
@@ -26,7 +26,7 @@ jobs:
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.18, 1.19, "1.20", 1.21]
3030
include:
3131
- os: ubuntu-latest
3232
go-build: ~/.cache/go-build
@@ -39,12 +39,12 @@ jobs:
3939
GOPROXY: https://proxy.golang.org
4040
steps:
4141
- name: Set up Go ${{ matrix.go }}
42-
uses: actions/setup-go@v3
42+
uses: actions/setup-go@v4
4343
with:
4444
go-version: ${{ matrix.go }}
4545

4646
- name: Checkout Code
47-
uses: actions/checkout@v3
47+
uses: actions/checkout@v4
4848
with:
4949
ref: ${{ github.ref }}
5050

.github/workflows/goreleaser.yml

Lines changed: 8 additions & 11 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,19 +12,16 @@ jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
-
16-
name: Checkout
17-
uses: actions/checkout@v3
15+
- name: Checkout
16+
uses: actions/checkout@v4
1817
with:
1918
fetch-depth: 0
20-
-
21-
name: Set up Go
22-
uses: actions/setup-go@v2
19+
- name: Set up Go
20+
uses: actions/setup-go@v4
2321
with:
24-
go-version: 1.17
25-
-
26-
name: Run GoReleaser
27-
uses: goreleaser/goreleaser-action@v3
22+
go-version: ^1
23+
- name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v5
2825
with:
2926
# either 'goreleaser' (default) or 'goreleaser-pro'
3027
distribution: goreleaser

0 commit comments

Comments
 (0)