diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index a5e1ea8392..17e8ae6926 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -16,10 +16,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up mise - uses: jdx/mise-action@v2 + - name: Get Go version from mise + id: mise + run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT + shell: bash + - name: Set up Go + uses: actions/setup-go@v6 with: - cache: true + go-version: ${{ steps.mise.outputs.go-version }} - name: (Windows) Enable pulling Go modules from private sourcegraph/sourcegraph if: runner.os == 'Windows' run: git config --global url."https://$env:PRIVATE_TOKEN@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/" diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml index ca8296f524..d4a8ee3847 100644 --- a/.github/workflows/go-lint.yml +++ b/.github/workflows/go-lint.yml @@ -13,10 +13,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up mise - uses: jdx/mise-action@v2 + - name: Get Go version from mise + id: mise + run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT + - name: Set up Go + uses: actions/setup-go@v6 with: - cache: true + go-version: ${{ steps.mise.outputs.go-version }} - name: Enable pulling Go modules from private sourcegraph/sourcegraph run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/" - run: ./dev/go-lint.sh diff --git a/.github/workflows/goreleaser-check.yml b/.github/workflows/goreleaser-check.yml index 5c89776044..547e6a554c 100644 --- a/.github/workflows/goreleaser-check.yml +++ b/.github/workflows/goreleaser-check.yml @@ -16,10 +16,13 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up mise - uses: jdx/mise-action@v2 + - name: Get Go version from mise + id: mise + run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT + - name: Set up Go + uses: actions/setup-go@v6 with: - cache: true + go-version: ${{ steps.mise.outputs.go-version }} - name: Enable pulling Go modules from private sourcegraph/sourcegraph run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/" - name: Check GoReleaser config diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 61bdce25ff..8f305d36a7 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -178,10 +178,13 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up mise - uses: jdx/mise-action@v2 + - name: Get Go version from mise + id: mise + run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT + - name: Set up Go + uses: actions/setup-go@v6 with: - cache: true + go-version: ${{ steps.mise.outputs.go-version }} - name: Enable pulling Go modules from private sourcegraph/sourcegraph run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/" - run: go test ./... diff --git a/.github/workflows/scip.yml b/.github/workflows/scip.yml index 29022fe7c5..b546ea8bfa 100644 --- a/.github/workflows/scip.yml +++ b/.github/workflows/scip.yml @@ -11,10 +11,13 @@ jobs: container: sourcegraph/scip-go steps: - uses: actions/checkout@v4 - - name: Set up mise - uses: jdx/mise-action@v2 + - name: Get Go version from mise + id: mise + run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT + - name: Set up Go + uses: actions/setup-go@v6 with: - cache: true + go-version: ${{ steps.mise.outputs.go-version }} - name: Set directory to safe for git run: git config --global --add safe.directory $GITHUB_WORKSPACE