ChatGPT-Next-Web/.github/workflows/docker.yml

53 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2023-03-27 14:44:09 +00:00
name: Publish Docker image
on:
2023-03-30 04:51:37 +00:00
workflow_dispatch:
2023-03-27 14:44:09 +00:00
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
2023-03-30 04:51:37 +00:00
-
name: Check out the repo
2023-03-27 14:44:09 +00:00
uses: actions/checkout@v3
2023-03-30 04:51:37 +00:00
-
name: Log in to Docker Hub
uses: docker/login-action@v2
2023-03-27 14:44:09 +00:00
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
2023-03-30 04:51:37 +00:00
-
name: Extract metadata (tags, labels) for Docker
2023-03-27 14:44:09 +00:00
id: meta
2023-03-30 04:51:37 +00:00
uses: docker/metadata-action@v4
2023-03-27 14:44:09 +00:00
with:
images: yidadaa/chatgpt-next-web
2023-03-30 04:51:37 +00:00
tags: |
type=raw,value=latest
2023-03-31 15:03:57 +00:00
type=ref,event=tag
2023-03-30 04:51:37 +00:00
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
2023-03-27 14:44:09 +00:00
2023-03-30 04:51:37 +00:00
-
name: Build and push Docker image
uses: docker/build-push-action@v4
2023-03-27 14:44:09 +00:00
with:
context: .
2023-04-10 09:39:21 +00:00
platforms: linux/amd64,linux/arm64
2023-03-27 14:44:09 +00:00
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2023-03-30 04:51:37 +00:00
cache-from: type=gha
cache-to: type=gha,mode=max
2023-03-30 17:56:42 +00:00