From 946f35c58eca4a5a2be4292038f58fd4a1ff863c Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Wed, 27 Mar 2024 03:04:09 +0100 Subject: [PATCH] ci(github): fix dockerhub auth --- .github/workflows/push.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1ac699c..6174ca2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -6,7 +6,7 @@ on: env: BACKEND_IMAGE_NAME: contribution-api DEMO_IMAGE_NAME: gradio - DOCKERHUB_USER: quackai + DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }} jobs: docker: @@ -34,14 +34,18 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v3 with: - username: $DOCKERHUB_USER - password: ${{ secrets.DOCKERHUB_PW }} + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push to hub run: | docker push $DOCKERHUB_USER/$BACKEND_IMAGE_NAME:latest docker push $DOCKERHUB_USER/$DEMO_IMAGE_NAME:latest - - name: Log in to GitHub container registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Push to container registry run: | IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$BACKEND_IMAGE_NAME