Skip to content

Commit

Permalink
feat: Add Docker image build and push steps for versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
mattevans committed Dec 11, 2024
1 parent e37a692 commit 04a337f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
packages: write

jobs:
goreleaser:
Expand All @@ -22,6 +23,12 @@ jobs:
with:
go-version: '1.21'

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

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
10 changes: 10 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ builds:
- amd64
- arm64

dockers:
- image_templates:
- "ethpandaops/contributoor-test:{{ .Version }}"
- "ethpandaops/contributoor-test:latest"
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.version={{.Version}}"

archives:
- format: tar.gz
name_template: >-
Expand Down

0 comments on commit 04a337f

Please sign in to comment.