Skip to content

Commit

Permalink
chore: add ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Mar 16, 2023
1 parent 30767b1 commit f3f1750
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ jobs:
with:
fetch-depth: 0

- name: Docker Login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
- name: dockerhub-login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: ghcr-login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: traefiker
password: ${{ secrets.GHCR_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
25 changes: 25 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ docker_manifests:
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'

- name_template: 'ghcr.io/traefik/whoami:{{ .Tag }}'
image_templates:
- 'ghcr.io/traefik/whoami:{{ .Tag }}-amd64'
- 'ghcr.io/traefik/whoami:{{ .Tag }}-arm64'
- 'ghcr.io/traefik/whoami:{{ .Tag }}-armv7'
- name_template: 'ghcr.io/traefik/whoami:latest'
image_templates:
- 'ghcr.io/traefik/whoami:{{ .Tag }}-amd64'
- 'ghcr.io/traefik/whoami:{{ .Tag }}-arm64'
- 'ghcr.io/traefik/whoami:{{ .Tag }}-armv7'
- name_template: 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}'
image_templates:
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'

dockers:
- use: buildx
goos: linux
Expand All @@ -60,6 +76,9 @@ dockers:
- 'traefik/whoami:latest-amd64'
- 'traefik/whoami:{{ .Tag }}-amd64'
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
- 'ghcr.io/traefik/whoami:latest-amd64'
- 'ghcr.io/traefik/whoami:{{ .Tag }}-amd64'
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-amd64'
build_flag_templates:
- '--pull'
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
Expand All @@ -81,6 +100,9 @@ dockers:
- 'traefik/whoami:latest-arm64'
- 'traefik/whoami:{{ .Tag }}-arm64'
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
- 'ghcr.io/traefik/whoami:latest-arm64'
- 'ghcr.io/traefik/whoami:{{ .Tag }}-arm64'
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-arm64'
build_flag_templates:
- '--pull'
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
Expand All @@ -103,6 +125,9 @@ dockers:
- 'traefik/whoami:latest-armv7'
- 'traefik/whoami:{{ .Tag }}-armv7'
- 'traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
- 'ghcr.io/traefik/whoami:latest-armv7'
- 'ghcr.io/traefik/whoami:{{ .Tag }}-armv7'
- 'ghcr.io/traefik/whoami:v{{ .Major }}.{{ .Minor }}-armv7'
build_flag_templates:
- '--pull'
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
Expand Down

0 comments on commit f3f1750

Please sign in to comment.