From a9a3e5d1e66cdead456eb2655144507bc1c2b5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20S=C3=A1nchez?= Date: Fri, 13 Aug 2021 13:02:04 +0200 Subject: [PATCH] Push docker image to GHCR --- .github/workflows/docker.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 49e5a54..152fa83 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -36,9 +36,27 @@ jobs: username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} - - name: Build and push docker + - name: Build and push docker to DockerHub uses: docker/build-push-action@v2 with: push: true platforms: linux/amd64,linux/arm64,linux/386 - tags: ${{ secrets.REGISTRY_USERNAME }}/prometheus-qbittorrent-exporter:latest,${{ secrets.REGISTRY_USERNAME }}/prometheus-qbittorrent-exporter:${{ steps.extract_branch.outputs.tag }} + tags: | + ${{ secrets.REGISTRY_USERNAME }}/prometheus-qbittorrent-exporter:latest + ${{ secrets.REGISTRY_USERNAME }}/prometheus-qbittorrent-exporter:${{ steps.extract_branch.outputs.tag }} + + - name: Login to Github Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.GHCR_PERSONAL_TOKEN }} + + - name: Build and push docker to Github Container Registry + uses: docker/build-push-action@v2 + with: + push: true + platforms: linux/amd64,linux/arm64,linux/386 + tags: | + ghcr.io/${{ secrets.REGISTRY_USERNAME }}/prometheus-qbittorrent-exporter:latest + ghcr.io/${{ secrets.REGISTRY_USERNAME }}/prometheus-qbittorrent-exporter:${{ steps.extract_branch.outputs.tag }}