diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8ac96f193..12ed8ccc3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,6 +2,9 @@ name: Publish Docker image on: workflow_dispatch: + push: + branches: + - main release: types: [published] @@ -17,18 +20,20 @@ jobs: name: Log in to Docker Hub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4 with: - images: yidadaa/chatgpt-next-web + images: diota/chatgpt-next-web tags: | - type=raw,value=latest - type=ref,event=tag + ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && 'type=sha,format=short' || '' }} + ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && 'type=raw,value=nightly' || '' }} + ${{ (github.event_name == 'release' || github.event_name == 'workflow_dispatch') && 'type=ref,event=tag' || '' }} + ${{ (github.event_name == 'release' || github.event_name == 'workflow_dispatch') && 'type=raw,value=stable' || '' }} - name: Set up QEMU