From 0231839a4bab09e727ab8c918dd465a4900e5a27 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 10 Oct 2023 14:59:10 +0800 Subject: [PATCH] chore: update GitHub Actions configurations - Change the cron schedule from `'41 23 * * 6'` to `"41 23 * * 6"` in the file `.github/workflows/codeql.yml` - Change the value of `language` from `['go']` to `["go"]` in the file `.github/workflows/codeql.yml` - Update the `actions/checkout` version from `v3` to `v4` in the file `.github/workflows/codeql.yml` - Update the `actions/setup-go` version from `v3` to `v4` in the file `.github/workflows/go.yml` - Change the `go-version` from `'^1.16'` to `"^1"` in the file `.github/workflows/go.yml` - Update the `actions/checkout` version from `v3` to `v4` in the file `.github/workflows/go.yml` - Change the list of `go` versions from `[1.14, 1.15, 1.16, 1.17, 1.18, 1.19, '1.20']` to `[1.18, 1.19, "1.20", 1.21]` in the file `.github/workflows/go.yml` - Update the `actions/setup-go` version from `v3` to `v4` in the file `.github/workflows/go.yml` - Update the `actions/checkout` version from `v3` to `v4` in the file `.github/workflows/goreleaser.yml` - Update the `actions/setup-go` version from `v2` to `v4` in the file `.github/workflows/goreleaser.yml` - Update the `goreleaser/goreleaser-action` version from `v3` to `v5` in the file `.github/workflows/goreleaser.yml` Signed-off-by: Bo-Yi Wu --- .github/workflows/codeql.yml | 34 ++++++++++++++++---------------- .github/workflows/go.yml | 12 +++++------ .github/workflows/goreleaser.yml | 6 +++--- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2d9bcdd..3b324f1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,12 +13,12 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: [master] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [master] schedule: - - cron: '41 23 * * 6' + - cron: "41 23 * * 6" jobs: analyze: @@ -32,23 +32,23 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'go' ] + language: ["go"] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index feb9f7c..0760761 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,11 +13,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: '^1.16' + go-version: "^1" - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -26,7 +26,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - go: [1.14, 1.15, 1.16, 1.17, 1.18, 1.19, '1.20'] + go: [1.18, 1.19, "1.20", 1.21] include: - os: ubuntu-latest go-build: ~/.cache/go-build @@ -39,12 +39,12 @@ jobs: GOPROXY: https://proxy.golang.org steps: - name: Set up Go ${{ matrix.go }} - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 64ed8b2..7dd991f 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -14,17 +14,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: 1.17 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v5 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser