-
Notifications
You must be signed in to change notification settings - Fork 13
61 lines (51 loc) · 1.82 KB
/
Copy pathdocker-release.yml
File metadata and controls
61 lines (51 loc) · 1.82 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
56
57
58
59
60
61
name: docker-release
on:
push:
branches: [main, master]
permissions:
contents: read
jobs:
publish-images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Pull base image
run: docker pull "${{ secrets.DOCKER_USERNAME }}/thuai9_base:base"
- name: Build and push server image
uses: docker/build-push-action@v5
with:
context: .
file: dependency/Dockerfile/Dockerfile_run_server
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/thuai9_run_server:latest
cache-from: type=gha,scope=run-server
cache-to: type=gha,mode=max,scope=run-server
- name: Build and push Python client image
uses: docker/build-push-action@v5
with:
context: .
file: dependency/Dockerfile/Dockerfile_run_client
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/thuai9_run_client:latest
build-args: |
BASE_IMAGE=${{ secrets.DOCKER_USERNAME }}/thuai9_base:base
cache-from: type=gha,scope=run-client
cache-to: type=gha,mode=max,scope=run-client
- name: Build and push C++ client image
uses: docker/build-push-action@v5
with:
context: .
file: dependency/Dockerfile/Dockerfile_cpp
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/thuai9_cpp:latest
build-args: |
BASE_IMAGE=${{ secrets.DOCKER_USERNAME }}/thuai9_base:base
cache-from: type=gha,scope=cpp
cache-to: type=gha,mode=max,scope=cpp