From a151d765caf841ee0f5e7873e2b3b95add9a6cce Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Wed, 17 Feb 2021 13:04:58 +0100 Subject: [PATCH] Publish Docker images to Github container registry. #6326 (#6329) --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb1d9279..655adcc0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,9 @@ jobs: - name: Docker login if: (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' run: echo ${{ secrets.DOCKER_KEY }} | docker login -u koenkk --password-stdin + - name: Docker login ghcr.io + if: (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' + run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u koenkk --password-stdin - name: Docker setup - QEMU if: (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' uses: docker/setup-qemu-action@v1 @@ -50,7 +53,7 @@ jobs: --platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7 \ -f docker/Dockerfile \ --push \ - -t koenkk/zigbee2mqtt:latest-dev \ + -t koenkk/zigbee2mqtt:latest-dev -t ghcr.io/koenkk/zigbee2mqtt:latest-dev \ . - name: Docker build release if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' @@ -61,7 +64,7 @@ jobs: --platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7 \ -f docker/Dockerfile \ --push \ - -t koenkk/zigbee2mqtt:latest -t "koenkk/zigbee2mqtt:$TAG" \ + -t koenkk/zigbee2mqtt:latest -t "koenkk/zigbee2mqtt:$TAG" -t ghcr.io/koenkk/zigbee2mqtt:latest -t "ghcr.io/koenkk/zigbee2mqtt:$TAG" \ . - name: Publish to npm if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'