Skip to content

Commit

Permalink
build: add docker image generation
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebedo committed Jan 28, 2024
1 parent efd159f commit 976d849
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install devbox
uses: jetpack-io/[email protected]
with:
devbox-version: 0.8.5
enable-cache: 'true'

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

- name: Publish release
run: devbox run release
Expand Down
25 changes: 17 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ archives:
release:
prerelease: auto
draft: true
github:
owner: aacebedo
name: dnsdock
Expand All @@ -44,17 +43,27 @@ changelog:
exclude:
- "^docs:"
- "^test:"
- "^bump:"

dockers:
- id: amd64 image
goos: linux

goarch: amd64

use: buildx
image_templates:
- aacebedo/dnsdock:latest
- aacebedo/dnsdock:{{ .Tag }}
- aacebedo/dnsdock:latest-amd64
- aacebedo/dnsdock:{{ .Tag }}-amd64
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"

# hooks:
# pre: docker login -u $DOCKER_USER -p $DOCKER_PASS
# post: docker push aacebedo/dnsdock:latest && docker push aacebedo/dnsdock:{{ .Tag }}
- id: arm image
goos: linux
goarch: arm
use: buildx
image_templates:
- aacebedo/dnsdock:latest-arm
- aacebedo/dnsdock:{{ .Tag }}-arm
build_flag_templates:
- "--pull"
- "--platform=linux/arm"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM scratch

COPY dnsdock /
ENTRYPOINT ["dnsdock"]
ENTRYPOINT ["/dnsdock"]

0 comments on commit 976d849

Please sign in to comment.