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

ci(github): fix dockerhub auth #137

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading