Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
ci(github): fix dockerhub auth
Browse files Browse the repository at this point in the history
  • Loading branch information
frgfm committed Mar 27, 2024
1 parent 441aaff commit 946f35c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 946f35c

Please sign in to comment.