-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (70 loc) · 2.54 KB
/
build-libra.yml
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
66
67
68
69
70
71
72
73
name: Build libra-data and dlu-watcher docker image
on:
push:
jobs:
docker:
env:
IMAGE_TAG: "1.8"
runs-on: ubuntu-latest
steps:
- name: Get branch names
id: branch-names
uses: tj-actions/branch-names@v8
- name: Get current branch name
if: steps.branch-names.outputs.is_default == 'false'
run: |
echo "Running on branch: ${{ steps.branch-names.outputs.current_branch }}"
- name: Checkout project sources
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 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.ENV_DOCKER_USER }}
password: ${{ secrets.ENV_DOCKER_PASS }}
-
name: Build and push data-management image for develop branch
if: steps.branch-names.outputs.current_branch == 'develop'
uses: docker/build-push-action@v6
with:
context: ./data_management
file: ./data_management/Dockerfile
push: true
tags:
"kingstonduo/data-management:${{env.IMAGE_TAG}}"
-
name: Build and push dlu-watcher image for develop branch
if: steps.branch-names.outputs.current_branch == 'develop'
uses: docker/build-push-action@v6
with:
context: ./data_management
push: true
file: "./data_management/DluWatcher"
tags:
"kingstonduo/dlu-watcher:${{env.IMAGE_TAG}}"
-
name: Build and push data-management image for non develop branch
if: steps.branch-names.outputs.current_branch != 'develop'
uses: docker/build-push-action@v6
with:
context: ./data_management
file: "./data_management/Dockerfile"
push: true
tags:
"kingstonduo/data-management:${{steps.branch-names.outputs.current_branch}}"
-
name: Build and push dlu-watcher image for non develop branch
if: steps.branch-names.outputs.current_branch != 'develop'
uses: docker/build-push-action@v6
with:
context: ./data_management
push: true
file: "./data_management/DluWatcher"
tags:
"kingstonduo/dlu-watcher:${{steps.branch-names.outputs.current_branch}}"