Skip to content

Commit

Permalink
Update Golang to 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
rick-a-lane-ii committed Mar 6, 2024
1 parent 187a0b4 commit 2e57db4
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-runner-provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.18'
go-version-file: go.mod
- name: Run tests
run: |
cd github-runner-provisioner
Expand Down
2 changes: 0 additions & 2 deletions github-runner-provisioner/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ run-macOS-arm64:

make test-github-provisioner SHA1=e504cfa93721fbea2a394d4de9c9be7d5270fc19 RUNNER_TAG=macOS-arm64



.PHONY: test-github-provisioner
test-github-provisioner:
curl -v -o /dev/null -s $(HOSTNAME)/github-runner-provisioner/?dry-run=$(DRY_RUN) -d "payload=$$(cat test/$(RUNNER_TAG)_payload.json)" -H 'X-Hub-Signature-256: sha1=$(SHA1)' -w "%{http_code}\n"
Expand Down
10 changes: 1 addition & 9 deletions github-runner-provisioner/dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
# 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/

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"]
2 changes: 1 addition & 1 deletion github-runner-provisioner/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions github-runner-provisioner/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 2e57db4

Please sign in to comment.