Skip to content

Commit

Permalink
chore: update GitHub Actions configuration
Browse files Browse the repository at this point in the history
- Change the cron expression from `'30 1 * * 0'` to `"30 1 * * 0"` in the file `.github/workflows/codeql.yaml`
- Change the value of `language` from `['go']` to `["go"]` in the file `.github/workflows/codeql.yaml`
- Update the version of `actions/setup-go` from `v3` to `v4` in the file `.github/workflows/go.yml`
- Update the `go-version` from `'^1'` to `"^1.21"` in the file `.github/workflows/go.yml`
- Update the `version` from `v1.49.0` to `latest` in the file `.github/workflows/go.yml`
- Add the `1.20` and `1.21` versions to the `go` list in the file `.github/workflows/go.yml`
- Update the version of `actions/setup-go` from `v3` to `v4` in the file `.github/workflows/go.yml`
- Change the value of `'*'` to `"*"` in the file `.github/workflows/goreleaser.yml`
- Change the name of the job from `Checkout` to `Checkout` in the file `.github/workflows/goreleaser.yml`
- Update the version of `actions/setup-go` from `v2` to `v4` in the file `.github/workflows/g

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Nov 26, 2023
1 parent 527b7ca commit a9de4f3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,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: '30 1 * * 0'
- cron: "30 1 * * 0"

jobs:
analyze:
Expand All @@ -33,7 +33,7 @@ jobs:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
# TODO: Enable for javascript later
language: [ 'go']
language: ["go"]

steps:
- name: Checkout repository
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: '^1'
go-version: "^1.21"
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
version: latest
args: --verbose

# Label of the container job
test:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.15, 1.16, 1.17, 1.18, 1.19]
go: [1.15, 1.16, 1.17, 1.18, 1.19, "1.20", 1.21]
include:
- os: ubuntu-latest
go-build: ~/.cache/go-build
Expand All @@ -34,7 +34,7 @@ jobs:

steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Goreleaser
on:
push:
tags:
- '*'
- "*"

permissions:
contents: write
Expand All @@ -12,18 +12,15 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.17
-
name: Run GoReleaser
go-version: ^1.21
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
Expand Down

0 comments on commit a9de4f3

Please sign in to comment.