forked from AIDotNet/OpenDeepWiki
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1.55 KB
/
docker-image.yml
File metadata and controls
37 lines (34 loc) · 1.55 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
name: Build and Push Docker Images
on:
push:
branches: [ main ]
jobs:
build:
strategy:
matrix:
image: [
{ name: 'koala-wiki', type: 'backend', platform: 'amd64', dockerfile: 'src/KoalaWiki/Dockerfile', context: '.' },
{ name: 'koala-wiki', type: 'backend', platform: 'arm64', dockerfile: 'src/KoalaWiki/Dockerfile.arm', context: '.', tag: ':arm64' },
{ name: 'koala-wiki-web', type: 'frontend', platform: 'amd64', dockerfile: 'web/Dockerfile', context: 'web' },
{ name: 'koala-wiki-web', type: 'frontend', platform: 'arm64', dockerfile: 'web/Dockerfile.arm', context: 'web', tag: ':arm64' }
]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push ${{ matrix.image.name }} for ${{ matrix.image.platform }}
uses: docker/build-push-action@v5
with:
context: ${{ matrix.image.context }}
file: ${{ matrix.image.dockerfile }}
platforms: linux/${{ matrix.image.platform }}
push: true
tags: crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/${{ matrix.image.name }}${{ matrix.image.tag || '' }}