From f14a179c33b2909f71343538b9d1f6ae6c076201 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 14 Jun 2021 12:19:12 +0200 Subject: [PATCH] push image also to GitHub Docker registry --- .github/workflows/deploy.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b730fa4c5..8c4997a67 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -112,7 +112,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push + - name: Log in to GitHub Docker Registry + uses: docker/login-action@v1 + with: + registry: docker.pkg.github.com + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Push to Docker Hub uses: docker/build-push-action@v2 with: context: . @@ -121,6 +127,15 @@ jobs: tags: ${{ github.repository }}:latest cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache + - name: Push to GitHub Packages + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + push: true + tags: docker.pkg.github.com/${{ github.repository }}:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache deploy: needs: [test, build]