-
Notifications
You must be signed in to change notification settings - Fork 220
65 lines (62 loc) · 1.94 KB
/
ai-service-release-stable-image.yaml
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
56
57
58
59
60
61
62
63
64
65
name: AI Service Release stable image
on:
push:
branches: [feature/ai-service/*]
workflow_dispatch:
inputs:
version:
description: Give a version for this release
type: string
required: true
defaults:
run:
working-directory: wren-ai-service
jobs:
upgrade-ai-service-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "stable-release-bot"
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.7.1
- name: Upgrade AI Service version
run: |
# version=${{ github.event.inputs.version }}
version='ci-demo'
poetry version --next-phase $version
git add pyproject.toml
git commit -m "Upgrade AI Service version to $version"
git push
build-image:
needs: upgrade-ai-service-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
run: |
echo "Building image for version ci-demo"
# docker buildx build \
# --platform linux/amd64,linux/arm64 \
# --tag ghcr.io/canner/wren-ai-service:${{ github.event.inputs.version }} \
# --tag ghcr.io/canner/wren-ai-service:latest \
# --file ./docker/Dockerfile \
# --push .