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 e3cef6f..c3fab77 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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 @@ -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 @@ -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 @@ -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