Skip to content

Commit

Permalink
Deps: bump Go to 1.21.3 (#2450)
Browse files Browse the repository at this point in the history
* build: override go version to 1.21.3

* build: re-enable cachix

* ci: set $USER if not set
  • Loading branch information
3u13r authored Oct 12, 2023
1 parent e80e607 commit 9e1a0c0
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 13 deletions.
18 changes: 14 additions & 4 deletions .github/actions/setup_bazel_nix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,20 @@ runs:
if: steps.check_inputs.outputs.nixPreinstalled == 'false'
uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac # v22

# - uses: cachix/cachix-action@6a9a34cdd93d0ae4b4b59fd678660efb08109f2f # v12
# with:
# name: katexochen
# extraPullNames: nix-community
- name: Set $USER if not set
shell: bash
run: |
echo "::group::Set \$USER if not set"
if [[ -z "$USER" ]]; then
echo "USER=$(id -un)" | tee -a "$GITHUB_ENV"
fi
echo "::endgroup::"
- uses: cachix/cachix-action@6a9a34cdd93d0ae4b4b59fd678660efb08109f2f # v12
with:
name: katexochen
extraPullNames: nix-community

- name: Install Bazelisk
if: steps.check_inputs.outputs.bazelPreinstalled == 'false' && steps.check_inputs.outputs.nixOS == 'false'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ccm-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "1.21.1"
go-version: "1.21.3"
cache: false

- name: Install Crane
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-os-image-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "1.21.1"
go-version: "1.21.3"
cache: false

- name: Determine version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: matrix.language == 'go'
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "1.21.1"
go-version: "1.21.3"
cache: false

- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "1.21.1"
go-version: "1.21.3"
cache: true

- name: Build generateMeasurements tool
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "1.21.1"
go-version: "1.21.3"
cache: true

- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-operator-codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "1.21.1"
go-version: "1.21.3"
cache: true

- name: Run code generation
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/gcp-guest-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y \
git

# Install Go
ARG GO_VER=1.21.1
ARG GO_VER=1.21.3
RUN wget -q https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz && \
rm go${GO_VER}.linux-amd64.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ go_rules_dependencies()
load("@io_tweag_rules_nixpkgs//nixpkgs:toolchains/go.bzl", "nixpkgs_go_configure")

nixpkgs_go_configure(
attribute_path = "go_1_21",
nix_file = "//bazel/go:go.nix",
repository = "@nixpkgs",
)

Expand Down
21 changes: 21 additions & 0 deletions bazel/go/go.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
let
pkgs = import <nixpkgs> { };
goAttr = pkgs.go_1_21.overrideAttrs (_: rec {
version = "1.21.3";
src = pkgs.fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-GG8rb4yLcE5paCGwmrIEGlwe4T3LwxVqE63PdZMe5Ig=";
};
});
in
pkgs.buildEnv
{
name = "bazel-go-toolchain";
paths = [ goAttr ];
postBuild = ''
touch $out/ROOT
ln -s $out/share/go/{api,doc,lib,misc,pkg,src,go.env} $out/
'';
} // {
version = goAttr.version;
}
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
go 1.21

toolchain go1.21.1
toolchain go1.21.3

use (
.
Expand Down

0 comments on commit 9e1a0c0

Please sign in to comment.