From 856cb4912cec20af0a44f2019caa46dbe2d8b519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= Date: Thu, 26 Nov 2020 09:39:56 +0000 Subject: [PATCH] Push to docker hub as well from ci --- .github/workflows/test.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1f43ede..616c22f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -47,7 +47,7 @@ jobs: key: venv ${{ env.CACHE }} - run: pip install poetry - name: Patch $PATH - run: echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV + run: echo "$HOME/.local/bin" >> $GITHUB_PATH - run: poetry install # Run tests - run: poetry run pytest @@ -55,9 +55,6 @@ jobs: runs-on: ubuntu-latest needs: test env: - DOCKER_REGISTRY_PASSWORD: ${{ secrets.BOT_TOKEN }} - DOCKER_REGISTRY_USERNAME: ${{ secrets.BOT_LOGIN }} - DOCKER_REGISTRY: ghcr.io DOCKER_REPO: tecnativa/docker-socket-proxy steps: # Prepare @@ -66,12 +63,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 # Build and push + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_LOGIN }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: registry: ghcr.io - username: ${{ env.DOCKER_REGISTRY_USERNAME }} - password: ${{ env.DOCKER_REGISTRY_PASSWORD }} + username: ${{ secrets.BOT_LOGIN }} + password: ${{ secrets.BOT_TOKEN }} - name: Build and push uses: docker/build-push-action@v2 with: @@ -81,4 +83,5 @@ jobs: load: false push: true tags: | - ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPO }} + ghcr.io/${{ env.DOCKER_REPO }} + ${{ env.DOCKER_REPO }}