Skip to content

Commit f3f1750

Browse files
committed
chore: add ghcr
1 parent 30767b1 commit f3f1750

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

.github/workflows/release.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ jobs:
2626
with:
2727
fetch-depth: 0
2828

29-
- name: Docker Login
30-
env:
31-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
32-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
33-
run: |
34-
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
29+
- name: dockerhub-login
30+
uses: docker/login-action@v1
31+
with:
32+
username: ${{ secrets.DOCKER_USERNAME }}
33+
password: ${{ secrets.DOCKER_PASSWORD }}
34+
35+
- name: ghcr-login
36+
uses: docker/login-action@v1
37+
with:
38+
registry: ghcr.io
39+
username: traefiker
40+
password: ${{ secrets.GHCR_TOKEN }}
3541

3642
- name: Set up QEMU
3743
uses: docker/setup-qemu-action@v2

.goreleaser.yml

+25
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ docker_manifests:
5151
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
5252
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
5353

54+
- name_template: 'ghcr.io/traefik/whoami:{{ .Tag }}'
55+
image_templates:
56+
- 'ghcr.io/traefik/whoami:{{ .Tag }}-amd64'
57+
- 'ghcr.io/traefik/whoami:{{ .Tag }}-arm64'
58+
- 'ghcr.io/traefik/whoami:{{ .Tag }}-armv7'
59+
- name_template: 'ghcr.io/traefik/whoami:latest'
60+
image_templates:
61+
- 'ghcr.io/traefik/whoami:{{ .Tag }}-amd64'
62+
- 'ghcr.io/traefik/whoami:{{ .Tag }}-arm64'
63+
- 'ghcr.io/traefik/whoami:{{ .Tag }}-armv7'
64+
- name_template: 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}'
65+
image_templates:
66+
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
67+
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
68+
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
69+
5470
dockers:
5571
- use: buildx
5672
goos: linux
@@ -60,6 +76,9 @@ dockers:
6076
- 'traefik/whoami:latest-amd64'
6177
- 'traefik/whoami:{{ .Tag }}-amd64'
6278
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
79+
- 'ghcr.io/traefik/whoami:latest-amd64'
80+
- 'ghcr.io/traefik/whoami:{{ .Tag }}-amd64'
81+
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
6382
build_flag_templates:
6483
- '--pull'
6584
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
@@ -81,6 +100,9 @@ dockers:
81100
- 'traefik/whoami:latest-arm64'
82101
- 'traefik/whoami:{{ .Tag }}-arm64'
83102
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
103+
- 'ghcr.io/traefik/whoami:latest-arm64'
104+
- 'ghcr.io/traefik/whoami:{{ .Tag }}-arm64'
105+
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
84106
build_flag_templates:
85107
- '--pull'
86108
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
@@ -103,6 +125,9 @@ dockers:
103125
- 'traefik/whoami:latest-armv7'
104126
- 'traefik/whoami:{{ .Tag }}-armv7'
105127
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
128+
- 'ghcr.io/traefik/whoami:latest-armv7'
129+
- 'ghcr.io/traefik/whoami:{{ .Tag }}-armv7'
130+
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
106131
build_flag_templates:
107132
- '--pull'
108133
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys

0 commit comments

Comments
 (0)