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 a2f4160
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
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
env:
Expand Down
24 changes: 17 additions & 7 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,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"

0 comments on commit a2f4160

Please sign in to comment.