Skip to content

Commit

Permalink
fix: copy missing files into image (#20)
Browse files Browse the repository at this point in the history
This also adds a docker-build job to the `ci` workflow to ensure we
discover image build errors before attempting to create a release.
  • Loading branch information
martinohmann authored Nov 29, 2024
1 parent add52b7 commit ddc7a84
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,26 @@ jobs:

- name: Run go vet
run: make vet

docker-build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Build image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: false
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23.2-alpine3.20 as builder
FROM golang:1.23.2-alpine3.20 AS builder

WORKDIR /src

Expand All @@ -7,11 +7,13 @@ RUN apk --update --no-cache add git make
ENV CGO_ENABLED=0

COPY go.mod go.mod
COPY go.sum go.sum
COPY Makefile Makefile

RUN go mod download

COPY *.go ./
COPY internal internal/

RUN make build

Expand Down

0 comments on commit ddc7a84

Please sign in to comment.