ci: refactor CI workflows and update Go version management

- Update CodeQL GitHub Action from version 2 to version 3 in codeql.yml
- Replace static Go version with dynamic version from go.mod and enable check for latest Go version in goreleaser.yml
- Add Checkout repository step to lint.yml workflow
- Replace static Go version with dynamic version from go.mod and enable check for latest Go version in lint.yml workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2024-03-05 21:39:02 +08:00
parent 58c63ee76a
commit 9d6dcccab5
3 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -51,4 +51,4 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
+2 -1
View File
@@ -19,7 +19,8 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: "^1"
go-version-file: go.mod
check-latest: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
+6 -3
View File
@@ -8,12 +8,15 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: "^1"
- name: Checkout repository
uses: actions/checkout@v4
go-version-file: go.mod
check-latest: true
- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v4
with: