Skip to content

Commit bb6fd64

Browse files
committed
ci: add ghcr
1 parent a85ff0f commit bb6fd64

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515

1616
permissions:
1717
contents: write
18+
packages: write
1819

1920
jobs:
2021
build:
@@ -53,6 +54,14 @@ jobs:
5354
username: ${{ secrets.DOCKERHUB_USERNAME }}
5455
password: ${{ secrets.DOCKERHUB_TOKEN }}
5556

57+
- name: Login to GHCR
58+
if: github.event_name != 'pull_request'
59+
uses: docker/login-action@v3
60+
with:
61+
registry: ghcr.io
62+
username: ${{ github.actor }}
63+
password: ${{ secrets.GITHUB_TOKEN }}
64+
5665
- name: Run GoReleaser
5766
uses: goreleaser/goreleaser-action@v3
5867
if: success() && startsWith(github.ref, 'refs/tags/')

.goreleaser.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ dockers:
2222
- image_templates:
2323
- "soulteary/webhook:linux-amd64-{{ .Tag }}"
2424
- "soulteary/webhook:linux-amd64"
25+
- "ghcr.io/soulteary/webhook:linux-amd64-{{ .Tag }}"
26+
- "ghcr.io/soulteary/webhook:linux-amd64"
2527
dockerfile: docker/goreleaser/Dockerfile
2628
use: buildx
2729
goarch: amd64
@@ -40,6 +42,8 @@ dockers:
4042
- image_templates:
4143
- "soulteary/webhook:linux-arm64-{{ .Tag }}"
4244
- "soulteary/webhook:linux-arm64"
45+
- "ghcr.io/soulteary/webhook:linux-arm64-{{ .Tag }}"
46+
- "ghcr.io/soulteary/webhook:linux-arm64"
4347
dockerfile: docker/goreleaser/Dockerfile
4448
use: buildx
4549
goos: linux
@@ -60,6 +64,8 @@ dockers:
6064
- image_templates:
6165
- "soulteary/webhook:linux-armv7-{{ .Tag }}"
6266
- "soulteary/webhook:linux-armv7"
67+
- "ghcr.io/soulteary/webhook:linux-armv7-{{ .Tag }}"
68+
- "ghcr.io/soulteary/webhook:linux-armv7"
6369
dockerfile: docker/goreleaser/Dockerfile
6470
use: buildx
6571
goos: linux
@@ -80,6 +86,8 @@ dockers:
8086
- image_templates:
8187
- "soulteary/webhook:linux-armv6-{{ .Tag }}"
8288
- "soulteary/webhook:linux-armv6"
89+
- "ghcr.io/soulteary/webhook:linux-armv6-{{ .Tag }}"
90+
- "ghcr.io/soulteary/webhook:linux-armv6"
8391
dockerfile: docker/goreleaser/Dockerfile
8492
use: buildx
8593
goos: linux
@@ -100,6 +108,8 @@ dockers:
100108
- image_templates:
101109
- "soulteary/webhook:linux-amd64-extend-{{ .Tag }}"
102110
- "soulteary/webhook:linux-amd64-extend"
111+
- "ghcr.io/soulteary/webhook:linux-amd64-extend-{{ .Tag }}"
112+
- "ghcr.io/soulteary/webhook:linux-amd64-extend"
103113
dockerfile: docker/goreleaser/Dockerfile.extend
104114
use: buildx
105115
goarch: amd64
@@ -118,6 +128,8 @@ dockers:
118128
- image_templates:
119129
- "soulteary/webhook:linux-arm64-extend-{{ .Tag }}"
120130
- "soulteary/webhook:linux-arm64-extend"
131+
- "ghcr.io/soulteary/webhook:linux-arm64-extend-{{ .Tag }}"
132+
- "ghcr.io/soulteary/webhook:linux-arm64-extend"
121133
dockerfile: docker/goreleaser/Dockerfile.extend
122134
use: buildx
123135
goos: linux
@@ -138,6 +150,8 @@ dockers:
138150
- image_templates:
139151
- "soulteary/webhook:linux-armv7-extend-{{ .Tag }}"
140152
- "soulteary/webhook:linux-armv7-extend"
153+
- "ghcr.io/soulteary/webhook:linux-armv7-extend-{{ .Tag }}"
154+
- "ghcr.io/soulteary/webhook:linux-armv7-extend"
141155
dockerfile: docker/goreleaser/Dockerfile.extend
142156
use: buildx
143157
goos: linux
@@ -158,6 +172,8 @@ dockers:
158172
- image_templates:
159173
- "soulteary/webhook:linux-armv6-extend-{{ .Tag }}"
160174
- "soulteary/webhook:linux-armv6-extend"
175+
- "ghcr.io/soulteary/webhook:linux-armv6-extend-{{ .Tag }}"
176+
- "ghcr.io/soulteary/webhook:linux-armv6-extend"
161177
dockerfile: docker/goreleaser/Dockerfile.extend
162178
use: buildx
163179
goos: linux
@@ -199,3 +215,28 @@ docker_manifests:
199215
- "soulteary/webhook:linux-armv7-{{ .Tag }}"
200216
- "soulteary/webhook:linux-armv6-{{ .Tag }}"
201217
skip_push: "false"
218+
219+
# GHCR multi-arch manifests
220+
- name_template: "ghcr.io/soulteary/webhook:{{ .Tag }}"
221+
image_templates:
222+
- "ghcr.io/soulteary/webhook:linux-amd64-{{ .Tag }}"
223+
- "ghcr.io/soulteary/webhook:linux-arm64-{{ .Tag }}"
224+
- "ghcr.io/soulteary/webhook:linux-armv7-{{ .Tag }}"
225+
- "ghcr.io/soulteary/webhook:linux-armv6-{{ .Tag }}"
226+
skip_push: "false"
227+
228+
- name_template: "ghcr.io/soulteary/webhook:extend-{{ .Tag }}"
229+
image_templates:
230+
- "ghcr.io/soulteary/webhook:linux-amd64-extend-{{ .Tag }}"
231+
- "ghcr.io/soulteary/webhook:linux-arm64-extend-{{ .Tag }}"
232+
- "ghcr.io/soulteary/webhook:linux-armv7-extend-{{ .Tag }}"
233+
- "ghcr.io/soulteary/webhook:linux-armv6-extend-{{ .Tag }}"
234+
skip_push: "false"
235+
236+
- name_template: "ghcr.io/soulteary/webhook:latest"
237+
image_templates:
238+
- "ghcr.io/soulteary/webhook:linux-amd64-{{ .Tag }}"
239+
- "ghcr.io/soulteary/webhook:linux-arm64-{{ .Tag }}"
240+
- "ghcr.io/soulteary/webhook:linux-armv7-{{ .Tag }}"
241+
- "ghcr.io/soulteary/webhook:linux-armv6-{{ .Tag }}"
242+
skip_push: "false"

0 commit comments

Comments
 (0)