Skip to content

Commit 512db63

Browse files
committed
chore: update GitHub Actions workflows for Go and CodeQL
- Change the cron schedule from `'30 1 * * 0'` to `"30 1 * * 0"` in `.github/workflows/codeql.yaml` - Change the value of `language` from `['go']` to `["go"]` in `.github/workflows/codeql.yaml` - Update the `uses` value from `actions/checkout@v3` to `actions/checkout@v4` in `.github/workflows/codeql.yaml` - Update the `uses` value from `actions/setup-go@v3` to `actions/setup-go@v4` in `.github/workflows/go.yml` - Change the value of `go-version` from `'1'` to `"^1"` in `.github/workflows/go.yml` - Update the `uses` value from `actions/checkout@v3` to `actions/checkout@v4` in `.github/workflows/go.yml` - Add a new job in `.github/workflows/go.yml` - Change the value of `go` from `[1.17, 1.18, 1.19]` to `[1.18, 1.19, "1.20", 1.21]` in `.github/workflows/go.yml` - Update the `uses` value from `actions/setup-go@v3` to `actions/setup-go@v4` in `.github/workflows/go.yml` - Update the `uses` value from Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 71f87e4 commit 512db63

File tree

3 files changed

+19
-23
lines changed

3 files changed

+19
-23
lines changed

.github/workflows/codeql.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ name: "CodeQL"
77

88
on:
99
push:
10-
branches: [ main ]
10+
branches: [main]
1111
pull_request:
1212
# The branches below must be a subset of the branches above
13-
branches: [ main ]
13+
branches: [main]
1414
schedule:
15-
- cron: '30 1 * * 0'
15+
- cron: "30 1 * * 0"
1616

1717
jobs:
1818
analyze:
@@ -33,11 +33,11 @@ jobs:
3333
# Override automatic language detection by changing the below list
3434
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
3535
# TODO: Enable for javascript later
36-
language: [ 'go']
36+
language: ["go"]
3737

3838
steps:
3939
- name: Checkout repository
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@v4
4141

4242
# Initializes the CodeQL tools for scanning.
4343
- name: Initialize CodeQL

.github/workflows/go.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,22 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Setup go
9-
uses: actions/setup-go@v3
9+
uses: actions/setup-go@v4
1010
with:
11-
go-version: '^1'
11+
go-version: "^1"
1212
- name: Checkout repository
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
- name: Setup golangci-lint
1515
uses: golangci/golangci-lint-action@v3
1616
with:
17-
version: v1.50.1
1817
args: --verbose
1918

2019
# Label of the container job
2120
test:
2221
strategy:
2322
matrix:
2423
os: [ubuntu-latest]
25-
go: [1.17, 1.18, 1.19]
24+
go: [1.18, 1.19, "1.20", 1.21]
2625
include:
2726
- os: ubuntu-latest
2827
go-build: ~/.cache/go-build
@@ -39,12 +38,12 @@ jobs:
3938
slave1-port: 6380
4039

4140
- name: Set up Go ${{ matrix.go }}
42-
uses: actions/setup-go@v3
41+
uses: actions/setup-go@v4
4342
with:
4443
go-version: ${{ matrix.go }}
4544

4645
- name: Checkout Code
47-
uses: actions/checkout@v3
46+
uses: actions/checkout@v4
4847
with:
4948
ref: ${{ github.ref }}
5049

.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@v3
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@v4
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)