Skip to content

Commit

Permalink
feat: add docker image build (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
aorfanos authored Apr 14, 2024
1 parent 226cc53 commit 01301bd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,16 @@ jobs:
go-version: '1.21'
check-latest: true
cache: true
-
name: Docker login
uses: docker/login-action@v3
with:
registry: 'ghcr.io'
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
Expand Down
5 changes: 5 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ builds:
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}

dockers:
- id: goscrape
image_templates:
- "ghcr.io/cornelk/goscrape:{{ .Version }}"

universal_binaries:
- replace: false

Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM gcr.io/distroless/static-debian12

COPY goscrape /

ENTRYPOINT ["./goscrape"]

0 comments on commit 01301bd

Please sign in to comment.