Skip to content

Commit 4b5f894

Browse files
committed
Add Docker image build during release
1 parent c27a832 commit 4b5f894

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
permissions:
1010
contents: write
11+
packages: write # required to push to GHCR
1112

1213
jobs:
1314
goreleaser:
@@ -21,6 +22,16 @@ jobs:
2122
uses: actions/setup-go@v4
2223
with:
2324
go-version: "1.25.0"
25+
# Buildx is required for multi-arch (dockers_v2 uses buildx)
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
# Login to GHCR
29+
- name: Log in to GHCR
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
2435
- name: Run GoReleaser
2536
uses: goreleaser/goreleaser-action@v5
2637
with:

.goreleaser.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,24 @@ brews:
136136
puts "Created localhost TLS certificates"
137137
end
138138
end
139+
140+
# New images builder
141+
dockers_v2:
142+
- id: openrun_img
143+
ids: [openrun]
144+
dockerfile: deploy/Dockerfile
145+
# Build both platforms and publish a single multi-arch manifest
146+
platforms: [linux/amd64, linux/arm64]
147+
images:
148+
- ghcr.io/openrundev/openrun
149+
tags:
150+
- "{{ .Tag }}" # e.g. v1.2.3
151+
- "sha-{{ .ShortCommit }}"
152+
- latest
153+
labels:
154+
"org.opencontainers.image.title": "openrun"
155+
"org.opencontainers.image.description": "OpenRun: Declarative Web App Deployment"
156+
"org.opencontainers.image.source": "{{ .GitURL }}"
157+
"org.opencontainers.image.revision": "{{ .FullCommit }}"
158+
"org.opencontainers.image.version": "{{ .Version }}"
159+
"org.opencontainers.image.created": "{{ .Date }}"

0 commit comments

Comments
 (0)