Skip to content

Commit

Permalink
Update Go and Github Actions tools (#471)
Browse files Browse the repository at this point in the history
* Update Go and some of the Github Actions tools

* fix

* updateghactions

* gobuild D_LARGEFILE64_SOURCE
  • Loading branch information
reinkrul authored Mar 18, 2024
1 parent 8ef7694 commit 929d257
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set version
id: version
Expand All @@ -43,23 +43,23 @@ jobs:
{{major}}.{{minor}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
build-args: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.19.x
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
# use go version from go.mod.
go-version-file: 'go.mod'
- name: Go Test
run: |
# we don't care about the assets
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN npm run build
#
# Build backend
#
FROM golang:1.19-alpine as backend-builder
FROM golang:1.22-alpine as backend-builder

ARG TARGETARCH
ARG TARGETOS
Expand All @@ -33,7 +33,7 @@ RUN go mod download && go mod verify

COPY . .
COPY --from=frontend-builder /app/web/dist /app/web/dist
RUN CGO_ENABLED=1 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-w -s" -o /app/nuts-demo-ehr
RUN CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-w -s" -o /app/nuts-demo-ehr

#
# Runtime
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/nuts-foundation/nuts-demo-ehr

go 1.21

toolchain go1.21.0
go 1.22

require (
github.com/avast/retry-go/v4 v4.5.1
Expand Down

0 comments on commit 929d257

Please sign in to comment.