From a12a21031235377ce8e134c7d67abdf87e8d46ab Mon Sep 17 00:00:00 2001 From: Nathaniel Caza Date: Tue, 13 Feb 2024 09:44:57 -0600 Subject: [PATCH 1/2] update Go to 1.22 --- .github/workflows/codeql.yml | 3 +++ .github/workflows/golangci-lint.yml | 2 +- devtools/ci/dockerfiles/build-env/Dockerfile | 2 +- devtools/ci/dockerfiles/goalert/Dockerfile | 2 +- devtools/ci/tasks/build-all.yml | 2 +- devtools/ci/tasks/build-binaries.yml | 2 +- devtools/ci/tasks/scripts/codecheck.sh | 2 +- devtools/ci/tasks/test-smoketest.yml | 2 +- go.mod | 2 +- 9 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7222609434..ac0bca124b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -39,6 +39,9 @@ jobs: # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: + - uses: actions/setup-go@v5 + with: + go-version: '1.22' - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 0f5425e952..0eac93fe9c 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' cache: false - uses: actions/checkout@v4 - name: golangci-lint diff --git a/devtools/ci/dockerfiles/build-env/Dockerfile b/devtools/ci/dockerfiles/build-env/Dockerfile index 24799f7e5d..f73567baa7 100644 --- a/devtools/ci/dockerfiles/build-env/Dockerfile +++ b/devtools/ci/dockerfiles/build-env/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/golang:1.21.3-bullseye +FROM docker.io/library/golang:1.22.0-bullseye RUN apt-get update && apt-get install -y \ apt-transport-https \ diff --git a/devtools/ci/dockerfiles/goalert/Dockerfile b/devtools/ci/dockerfiles/goalert/Dockerfile index 59dd3c5fc6..e4ed4e0c55 100644 --- a/devtools/ci/dockerfiles/goalert/Dockerfile +++ b/devtools/ci/dockerfiles/goalert/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/goalert/build-env:go1.21.4-postgres13 AS build +FROM docker.io/goalert/build-env:go1.22.0-postgres13 AS build COPY / /build/ WORKDIR /build RUN make clean bin/build/goalert-linux-amd64 diff --git a/devtools/ci/tasks/build-all.yml b/devtools/ci/tasks/build-all.yml index 51e4e9c61e..9ef9bb6c33 100644 --- a/devtools/ci/tasks/build-all.yml +++ b/devtools/ci/tasks/build-all.yml @@ -10,7 +10,7 @@ outputs: - name: bin image_resource: type: registry-image - source: { repository: goalert/build-env, tag: go1.21.4-postgres13 } + source: { repository: goalert/build-env, tag: go1.22.0-postgres13 } run: path: sh dir: goalert diff --git a/devtools/ci/tasks/build-binaries.yml b/devtools/ci/tasks/build-binaries.yml index 0bbb9c3c98..883201068f 100644 --- a/devtools/ci/tasks/build-binaries.yml +++ b/devtools/ci/tasks/build-binaries.yml @@ -13,7 +13,7 @@ outputs: - name: bin image_resource: type: registry-image - source: { repository: goalert/build-env, tag: go1.21.4-postgres13 } + source: { repository: goalert/build-env, tag: go1.22.0-postgres13 } run: path: sh dir: goalert diff --git a/devtools/ci/tasks/scripts/codecheck.sh b/devtools/ci/tasks/scripts/codecheck.sh index 51d097c8c0..76906349c1 100755 --- a/devtools/ci/tasks/scripts/codecheck.sh +++ b/devtools/ci/tasks/scripts/codecheck.sh @@ -12,7 +12,7 @@ if [ "$PKG_JSON_VER" != "$DOCKERFILE_VER" ]; then fi # assert build-env versions are identical -BUILD_ENV_VER=go1.21.4-postgres13 +BUILD_ENV_VER=go1.22.0-postgres13 for file in $(find devtools -name 'Dockerfile*'); do if ! grep -q "goalert/build-env" "$file"; then continue diff --git a/devtools/ci/tasks/test-smoketest.yml b/devtools/ci/tasks/test-smoketest.yml index 4a9c20b283..b22e1da9ac 100644 --- a/devtools/ci/tasks/test-smoketest.yml +++ b/devtools/ci/tasks/test-smoketest.yml @@ -8,7 +8,7 @@ outputs: - name: debug image_resource: type: registry-image - source: { repository: goalert/build-env, tag: go1.21.4-postgres13 } + source: { repository: goalert/build-env, tag: go1.22.0-postgres13 } run: path: sh dir: goalert diff --git a/go.mod b/go.mod index 265512c717..db837a4e29 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/target/goalert -go 1.21 +go 1.22 require ( github.com/99designs/gqlgen v0.17.43 From 854a3d109deac12df91e13bad9bfa8ac19d7e8dd Mon Sep 17 00:00:00 2001 From: Nathaniel Caza Date: Tue, 13 Feb 2024 09:57:35 -0600 Subject: [PATCH 2/2] update Go for node checks (uses gen cmds) --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0f88c4e1c..2aa57c70c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,6 +10,9 @@ jobs: runs-on: ubuntu-latest if: github.event.pull_request.draft == false steps: + - uses: actions/setup-go@v5 + with: + go-version: '1.22' - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: