-
Notifications
You must be signed in to change notification settings - Fork 7
103 lines (86 loc) · 4.16 KB
/
docker_upload.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Build and Push Docker Images
on: push
jobs:
build-common:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Extract Git Tag
run: |
VERSION=$(cat daliuge-common/VERSION | sed s/v// )
echo "TAG=$VERSION" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push daliuge-common
working-directory: daliuge-common
run: |
docker build -t icrar/daliuge-common:$TAG -t icrar/daliuge-common:latest -f docker/Dockerfile .
docker push --all-tags icrar/daliuge-common
build-engine:
needs: build-common
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Extract Git Tag
run: |
VERSION=$(cat daliuge-engine/VERSION | sed s/v// )
echo "TAG=$VERSION" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build engine
working-directory: daliuge-engine
run: |
docker build --build-arg VCS_TAG=$TAG --no-cache -t icrar/daliuge-engine:$TAG -t icrar/daliuge-translator:latest -f docker/Dockerfile .
curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -
slim build --include-shell \
--include-path /etc --include-path /usr/local/lib --include-path /usr/local/bin --include-path /usr/lib/python3.10 \
--include-path /usr/lib/python3 --include-bin /usr/bin/hostname --include-path /dlg --include-path /daliuge \
--include-bin /usr/bin/basename --include-bin /usr/bin/groups \
--include-path /usr/lib/x86_64-linux-gnu/ \
--include-path /lib/systemd/ --include-path /lib/lsb/ \
--include-bin /usr/sbin/service --publish-exposed-ports=true \
--http-probe=false --continue-after 5 --tag=icrar/daliuge-engine.slim:local \
--tag=icrar/daliuge-engine.slim:latest \
icrar/daliuge-engine:local
docker push --all-tags icrar/daliuge-engine
docker push --all-tags icrar/daliuge-engine.slim
build-translator:
needs: build-common
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Extract Git Tag
run: |
VERSION=$(cat daliuge-translator/VERSION | sed s/v// )
echo "TAG=$VERSION" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build translator
working-directory: daliuge-translator
run: |
docker build --build-arg VCS_TAG=$TAG --no-cache -t icrar/daliuge-translator:$TAG -t icrar/daliuge-translator:latest -f docker/Dockerfile .
curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -
slim build --include-shell \
--include-path /etc --include-path /usr/local/lib --include-path /usr/local/bin --include-path /usr/lib/python3.10 \
--include-path /usr/lib/python3 --include-bin /usr/bin/hostname --include-path /dlg --include-path /daliuge \
--include-bin /usr/bin/basename --include-bin /usr/bin/groups \
--include-path /usr/lib/x86_64-linux-gnu/ \
--include-path /lib/systemd/ --include-path /lib/lsb/ \
--include-bin /usr/sbin/service --publish-exposed-ports=true \
--http-probe=false --continue-after 5 --tag=icrar/daliuge-translator.slim:local \
--tag=icrar/daliuge-translator.slim:latest \
icrar/daliuge-translator:local
docker push --all-tags icrar/daliuge-translator
docker push --all-tags icrar/daliuge-translator.slim