Skip to content

Commit ceb19a9

Browse files
committed
ci: refactor CI/CD workflows and dependencies
- Change cron job schedule quotes from single to double in codeql.yml - Update CodeQL action version from v2 to v3 in codeql.yml - Update Go version pattern from '^1.16' to '^1' in go.yml - Restrict Go versions to 1.18, 1.19, "1.20", 1.21, 1.22 in go.yml - Upgrade codecov-action from v3 to v4 in go.yml Signed-off-by: appleboy <[email protected]>
1 parent 9336054 commit ceb19a9

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

.github/workflows/codeql.yml

+17-17
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

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup go
1616
uses: actions/setup-go@v5
1717
with:
18-
go-version: '^1.16'
18+
go-version: "^1"
1919
- name: Checkout repository
2020
uses: actions/checkout@v4
2121
- name: Setup golangci-lint
@@ -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, 1.22]
3030
include:
3131
- os: ubuntu-latest
3232
go-build: ~/.cache/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 }}

0 commit comments

Comments
 (0)