Skip to content

Commit

Permalink
ci: add docker image
Browse files Browse the repository at this point in the history
A docker image will be uploaded to github's registry on new
releases, it is also built as part of the QA job to ensure no
regressions.
  • Loading branch information
crazybolillo committed Jul 25, 2024
1 parent ae8b52a commit 4a66bce
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
docs/
dist/
.github/

.dockerignore
.gitignore

Makefile
README.md
LICENSE
8 changes: 8 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ jobs:
run: sqlc vet
- name: Diff
run: sqlc diff
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/build-push-action@v5
with:
context: .
push: false
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:1.22

WORKDIR /app

COPY . .

ENV CGO_ENABLED=0
RUN go build -o /bin/eryth ./cmd

FROM scratch

COPY --from=0 /bin/eryth /bin/eryth

ENTRYPOINT ["eryth"]

0 comments on commit 4a66bce

Please sign in to comment.