Upgrade to go 1.21 which offers fully reproducible builds (on top of SLSA's attestations)

This commit is contained in:
David Dworken 2023-10-01 18:00:58 -07:00
parent f674502eb9
commit 7ad1e2fb03
No known key found for this signature in database
6 changed files with 12 additions and 12 deletions

View File

@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.21
- name: Docker Compose setup
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
run: |

View File

@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.21
- name: Linux Setup
if: ${{ !startsWith(github.event.head_commit.message, 'Release') && matrix.os == 'ubuntu-latest'}}
run: |

View File

@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.21
- name: Build server binary
run: |
GOARCH=${{ matrix.goarch }} GOOS=${{ matrix.goos }} go build -o hishtory-server-${{ matrix.goos }}-${{ matrix.goarch }} backend/server/server.go

View File

@ -32,7 +32,7 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.2.1
with:
config-file: .github/slsa/.slsa-goreleaser-linux-amd64.yml
go-version: 1.18
go-version: 1.21
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}"
compile-builder: true # See github.com/slsa-framework/slsa-github-generator/issues/942
build-linux-arm64:
@ -44,7 +44,7 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.2.1
with:
config-file: .github/slsa/.slsa-goreleaser-linux-arm64.yml
go-version: 1.18
go-version: 1.21
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}"
compile-builder: true # See github.com/slsa-framework/slsa-github-generator/issues/942
build-linux-arm7:
@ -56,7 +56,7 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.2.1
with:
config-file: .github/slsa/.slsa-goreleaser-linux-arm7.yml
go-version: 1.18
go-version: 1.21
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}"
compile-builder: true # See github.com/slsa-framework/slsa-github-generator/issues/942
build-freebsd-amd64:
@ -68,7 +68,7 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.2.1
with:
config-file: .github/slsa/.slsa-goreleaser-freebsd-amd64.yml
go-version: 1.18
go-version: 1.21
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}"
compile-builder: true # See github.com/slsa-framework/slsa-github-generator/issues/942
build-netbsd-amd64:
@ -80,7 +80,7 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.2.1
with:
config-file: .github/slsa/.slsa-goreleaser-netbsd-amd64.yml
go-version: 1.18
go-version: 1.21
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}"
compile-builder: true # See github.com/slsa-framework/slsa-github-generator/issues/942
build-darwin-amd64:
@ -93,7 +93,7 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.2.1
with:
config-file: .github/slsa/.slsa-goreleaser-darwin-amd64.yml
go-version: 1.18
go-version: 1.21
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}"
compile-builder: true # See github.com/slsa-framework/slsa-github-generator/issues/942
build-darwin-arm64:
@ -106,7 +106,7 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.2.1
with:
config-file: .github/slsa/.slsa-goreleaser-darwin-arm64.yml
go-version: 1.18
go-version: 1.21
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}"
compile-builder: true # See github.com/slsa-framework/slsa-github-generator/issues/942

View File

@ -1,4 +1,4 @@
FROM golang:1.18-alpine3.17 AS builder
FROM golang:1.21-alpine3.17 AS builder
WORKDIR /app
RUN apk add --update --no-cache --virtual .build-deps build-base

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/ddworken/hishtory
go 1.18
go 1.21
require (
github.com/DataDog/datadog-go v4.8.3+incompatible