Skip to content

Commit 7851df1

Browse files
authored
switch back to using setup-go (#1209)
1 parent 88c7667 commit 7851df1

File tree

5 files changed

+31
-15
lines changed

5 files changed

+31
-15
lines changed

.github/workflows/go-ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
19-
- name: Set up mise
20-
uses: jdx/mise-action@v2
19+
- name: Get Go version from mise
20+
id: mise
21+
run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT
22+
shell: bash
23+
- name: Set up Go
24+
uses: actions/setup-go@v6
2125
with:
22-
cache: true
26+
go-version: ${{ steps.mise.outputs.go-version }}
2327
- name: (Windows) Enable pulling Go modules from private sourcegraph/sourcegraph
2428
if: runner.os == 'Windows'
2529
run: git config --global url."https://$env:PRIVATE_TOKEN@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/"

.github/workflows/go-lint.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ jobs:
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
16-
- name: Set up mise
17-
uses: jdx/mise-action@v2
16+
- name: Get Go version from mise
17+
id: mise
18+
run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT
19+
- name: Set up Go
20+
uses: actions/setup-go@v6
1821
with:
19-
cache: true
22+
go-version: ${{ steps.mise.outputs.go-version }}
2023
- name: Enable pulling Go modules from private sourcegraph/sourcegraph
2124
run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/"
2225
- run: ./dev/go-lint.sh

.github/workflows/goreleaser-check.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ jobs:
1616
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
- name: Set up mise
20-
uses: jdx/mise-action@v2
19+
- name: Get Go version from mise
20+
id: mise
21+
run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT
22+
- name: Set up Go
23+
uses: actions/setup-go@v6
2124
with:
22-
cache: true
25+
go-version: ${{ steps.mise.outputs.go-version }}
2326
- name: Enable pulling Go modules from private sourcegraph/sourcegraph
2427
run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/"
2528
- name: Check GoReleaser config

.github/workflows/goreleaser.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,13 @@ jobs:
178178
uses: actions/checkout@v4
179179
with:
180180
fetch-depth: 0
181-
- name: Set up mise
182-
uses: jdx/mise-action@v2
181+
- name: Get Go version from mise
182+
id: mise
183+
run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT
184+
- name: Set up Go
185+
uses: actions/setup-go@v6
183186
with:
184-
cache: true
187+
go-version: ${{ steps.mise.outputs.go-version }}
185188
- name: Enable pulling Go modules from private sourcegraph/sourcegraph
186189
run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/"
187190
- run: go test ./...

.github/workflows/scip.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ jobs:
1111
container: sourcegraph/scip-go
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Set up mise
15-
uses: jdx/mise-action@v2
14+
- name: Get Go version from mise
15+
id: mise
16+
run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT
17+
- name: Set up Go
18+
uses: actions/setup-go@v6
1619
with:
17-
cache: true
20+
go-version: ${{ steps.mise.outputs.go-version }}
1821

1922
- name: Set directory to safe for git
2023
run: git config --global --add safe.directory $GITHUB_WORKSPACE

0 commit comments

Comments
 (0)