forked from agentscope-ai/QwenPaw
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.73 KB
/
docker-release.yml
File metadata and controls
55 lines (48 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Build CoPaw multi-arch Docker image and push to DockerHub + Aliyun ACR on release.
# Tags per registry: <version> and pre (pre updated every run).
name: Docker Build and Push on Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: "Image tag (e.g. v1.2.3)"
required: true
type: string
env:
ACR_REGISTRY: agentscope-registry.ap-southeast-1.cr.aliyuncs.com
IMAGE: agentscope/copaw
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to Aliyun ACR
uses: docker/login-action@v3
with:
registry: ${{ env.ACR_REGISTRY }}
username: ${{ secrets.ALIYUN_ACR_USERNAME }}
password: ${{ secrets.ALIYUN_ACR_PASSWORD }}
- name: Build and push multi-arch (version + pre)
env:
VERSION: ${{ github.event.release.tag_name || inputs.version }}
COPAW_ENABLED_CHANNELS: "discord,dingtalk,feishu,qq,console"
run: |
TAGS="-t ${ACR_REGISTRY}/${IMAGE}:${VERSION} -t ${ACR_REGISTRY}/${IMAGE}:pre \
-t docker.io/${IMAGE}:${VERSION} -t docker.io/${IMAGE}:pre"
docker buildx build --platform linux/amd64,linux/arm64 \
-f deploy/Dockerfile \
--build-arg COPAW_ENABLED_CHANNELS="${COPAW_ENABLED_CHANNELS}" \
${TAGS} --push .