From f3f17505276a40958d485ce530b695f0a8f35af6 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Thu, 16 Mar 2023 10:15:00 +0100 Subject: [PATCH] chore: add ghcr --- .github/workflows/release.yml | 18 ++++++++++++------ .goreleaser.yml | 25 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 043c10d..452ba27 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.goreleaser.yml b/.goreleaser.yml index 1908920..93dbbff 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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 @@ -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 @@ -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 @@ -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