flow: docker image publish with push and release
This commit is contained in:
parent
28cbe56cec
commit
6bd53cc022
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue