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 9a82d50 commit b8c5b2f
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/whoamitcp:v{{ .Major }}.{{ .Minor }}-arm64'
- 'traefik/whoamitcp:v{{ .Major }}.{{ .Minor }}-armv7'

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

dockers:
- use: buildx
goos: linux
Expand All @@ -60,6 +76,9 @@ dockers:
- 'traefik/whoamitcp:latest-amd64'
- 'traefik/whoamitcp:{{ .Tag }}-amd64'
- 'traefik/whoamitcp:v{{ .Major }}.{{ .Minor }}-amd64'
- 'ghcr.io/traefik/whoamitcp:latest-amd64'
- 'ghcr.io/traefik/whoamitcp:{{ .Tag }}-amd64'
- 'ghcr.io/traefik/whoamitcp: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/whoamitcp:latest-arm64'
- 'traefik/whoamitcp:{{ .Tag }}-arm64'
- 'traefik/whoamitcp:v{{ .Major }}.{{ .Minor }}-arm64'
- 'ghcr.io/traefik/whoamitcp:latest-arm64'
- 'ghcr.io/traefik/whoamitcp:{{ .Tag }}-arm64'
- 'ghcr.io/traefik/whoamitcp: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/whoamitcp:latest-armv7'
- 'traefik/whoamitcp:{{ .Tag }}-armv7'
- 'traefik/whoamitcp:v{{ .Major }}.{{ .Minor }}-armv7'
- 'ghcr.io/traefik/whoamitcp:latest-armv7'
- 'ghcr.io/traefik/whoamitcp:{{ .Tag }}-armv7'
- 'ghcr.io/traefik/whoamitcp: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 b8c5b2f

Please sign in to comment.