Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rely on go.mod go version in all workflows #8911

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
languages: go
queries: security-and-quality

- name: Setup go
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version-file: 'go.mod'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
11 changes: 4 additions & 7 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Deployment
run-name: ${{ inputs.tag_name }} / go ${{ inputs.go_version }} / ${{ inputs.environment }}
run-name: ${{ inputs.tag_name }} / ${{ inputs.environment }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand All @@ -17,9 +17,6 @@ on:
environment:
default: production
type: environment
go_version:
default: "1.22"
type: string
platforms:
default: "linux,macos,windows"
type: string
Expand All @@ -39,7 +36,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go_version }}
go-version-file: 'go.mod'
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down Expand Up @@ -73,7 +70,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go_version }}
go-version-file: 'go.mod'
- name: Configure macOS signing
if: inputs.environment == 'production'
env:
Expand Down Expand Up @@ -130,7 +127,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go_version }}
go-version-file: 'go.mod'
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Restore Go modules cache
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -48,14 +48,14 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Build executable
run: make

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Restore Go modules cache
uses: actions/cache@v4
with:
Expand Down