Skip to content

Commit

Permalink
fix: update workflows and dependencies
Browse files Browse the repository at this point in the history
- Fix a typo in the cron expression for the codeql workflow
- Update the language specification for the codeql workflow to use double quotes instead of single quotes
- Update the file paths in the goreleaser workflow to use double quotes instead of single quotes
- Update the version of the goreleaser action to v5
- Update the Go version range in the lint workflow to include Go 1.21
- Update the version of the linter to the latest version

Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Oct 9, 2023
1 parent e8253f1 commit 2d48feb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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@v4
- 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
13 changes: 5 additions & 8 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,19 +12,16 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- 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
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.16, 1.17, 1.18, 1.19, '1.20']
go: [1.18, 1.19, "1.20", 1.21]
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}

Expand All @@ -28,5 +28,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.1
version: latest
args: --verbose --timeout 10m

0 comments on commit 2d48feb

Please sign in to comment.