Skip to content

Commit

Permalink
add docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
equinox0815 committed Dec 22, 2023
1 parent b6a6b1b commit 51a7976
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@ jobs:
extra_files: AUTHORS LICENSE README.md doc/man/whawty-nginx-sso.8
md5sum: false
sha256sum: true
docker:
name: Build and Publish Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: VaultVulp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: app
image-platform: linux/arm64,linux/amd64,linux/i386
extract-git-tag: true
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM golang:1.21 as builder
ADD . /src
RUN cd /src && CGO_ENABLED=0 go build ./cmd/whawty-nginx-sso

FROM scratch
COPY --from=builder /src/whawty-nginx-sso /whawty-nginx-sso
ENTRYPOINT [ "/whawty-nginx-sso" ]
CMD [ "--config", "/config/config.yml", "run" ]

0 comments on commit 51a7976

Please sign in to comment.