Skip to content

Commit

Permalink
chore(github-actions): update Go setup step in codeql-analysis, mongo…
Browse files Browse the repository at this point in the history
…-test, and nats-test workflows

- Use actions/setup-go@v4 instead of actions/setup-go@v2 for better compatibility and features
- Replace hardcoded go-version with go-version-file: go.mod for dynamic Go versioning based on the project's go.mod file
- Rename 'Set up Go' to 'Setup Go' for consistency across workflows
  • Loading branch information
bounoable committed Sep 20, 2023
1 parent 617ce50 commit 477a017
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mongo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
uses: styfle/[email protected]
if: ${{ !env.ACT }}
with:
access_token: ${{ github.token }}
access_token: ${{ github.token }}

- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.0
go-version-file: go.mod

- name: Test
run: make mongo-test
6 changes: 3 additions & 3 deletions .github/workflows/nats-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:

- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.0
go-version-file: go.mod

- name: Test
run: make nats-test

0 comments on commit 477a017

Please sign in to comment.