diff --git a/.github/workflows/github-runner-provisioner.yaml b/.github/workflows/github-runner-provisioner.yaml index 29f531a9..d6c3edd4 100644 --- a/.github/workflows/github-runner-provisioner.yaml +++ b/.github/workflows/github-runner-provisioner.yaml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '1.18' + go-version: '1.22' - name: Run tests run: | cd github-runner-provisioner diff --git a/github-runner-provisioner/dockerfile b/github-runner-provisioner/dockerfile index 51a3d207..9f5f79df 100644 --- a/github-runner-provisioner/dockerfile +++ b/github-runner-provisioner/dockerfile @@ -1,21 +1,15 @@ -# Stage 1: Compile Go target -FROM golang:1.18 as builder +FROM golang:1.22 as builder WORKDIR /app -# Copy go mod and sum files COPY go.mod go.sum ./ -# Download all dependencies RUN go mod download -# Copy the source from the current directory to the Working Directory inside the container COPY . . -# Build the Go app RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . -# Stage 2: Set up Ubuntu 22.04 image FROM ubuntu:22.04 WORKDIR /root/ @@ -23,8 +17,6 @@ WORKDIR /root/ RUN apt-get update && apt-get install -y ca-certificates openssl ENV SSL_CERT_DIR=/etc/ssl/certs -# Copy the pre-built binary from the previous stage. COPY --from=builder /app/main . -# Command to run the executable CMD ["./main"] diff --git a/github-runner-provisioner/go.mod b/github-runner-provisioner/go.mod index f682a6d0..2820edbb 100644 --- a/github-runner-provisioner/go.mod +++ b/github-runner-provisioner/go.mod @@ -1,6 +1,6 @@ module github.com/datawire/infra-actions/github-runner-provisioner -go 1.18 +go 1.22 require ( github.com/aws/aws-sdk-go-v2/config v1.17.10 diff --git a/github-runner-provisioner/go.sum b/github-runner-provisioner/go.sum index 2776489f..0f418044 100644 --- a/github-runner-provisioner/go.sum +++ b/github-runner-provisioner/go.sum @@ -141,6 +141,7 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v48 v48.0.0 h1:9H5fWVXFK6ZsRriyPbjtnFAkJnoj0WKFtTYfpCRrTm8= github.com/google/go-github/v48 v48.0.0/go.mod h1:dDlehKBDo850ZPvCTK0sEqTCVWcrGl2LcDiajkYi89Y= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=