|
|
@ -3,6 +3,8 @@ name: build_docker
|
|
|
|
on:
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
release:
|
|
|
|
|
|
|
|
types: [created] # 表示在创建新的 Release 时触发
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
build_docker:
|
|
|
|
build_docker:
|
|
|
@ -11,11 +13,11 @@ jobs:
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Docker meta
|
|
|
|
|
|
|
|
id: meta
|
|
|
|
- run: |
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
echo "本次构建的版本为:${GITHUB_REF_NAME} (但是这个变量目前上下文中无法获取到)"
|
|
|
|
with:
|
|
|
|
echo 本次构建的版本为:${{ github.ref_name }}
|
|
|
|
images: chenzhaoyu94/chatgpt-web
|
|
|
|
env
|
|
|
|
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
@ -32,6 +34,8 @@ jobs:
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
push: true
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
|
|
|
|
tags: |
|
|
|
|
|
|
|
|
${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-web:${{ github.ref_name }}
|
|
|
|
|
|
|
|
${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-web:latest
|
|
|
|