Skip to content

Commit

Permalink
chore: update GitHub Actions configuration for Go workflows
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 language option from `[ 'go']` to `["go"]` in the file `.github/workflows/codeql.yaml`
- Update the `actions/checkout` version from `v3` to `v4` in the file `.github/workflows/codeql.yaml`
- Change the go version from `'^1'` 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 go version options from `[1.17, 1.18, 1.19, '1.20']` to `[1.18, 1.19, "1.20", 1.21]` in the file `.github/workflows/go.yml`
- Change the tags expression from `'*'` to `"*"` in the file `.github/workflows/goreleaser.yml`
- Update the `actions/checkout` version from `v3` to `v4` in the file `.github/workflows/goreleaser.yml`
- Change the go version from `1.17` to `1.18` in the file `.github/workflows/goreleaser.yml`
-

Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Sep 23, 2023
1 parent dcbcb6a commit 1cd0f2b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
10 changes: 5 additions & 5 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,11 +33,11 @@ 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
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '^1'
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:
Expand All @@ -36,7 +36,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go: [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
Expand Down
17 changes: 7 additions & 10 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:
actions: read
Expand All @@ -18,19 +18,16 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.17
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
go-version: 1.18
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
Expand Down

0 comments on commit 1cd0f2b

Please sign in to comment.