-
Notifications
You must be signed in to change notification settings - Fork 12
145 lines (144 loc) · 4.58 KB
/
docker-image.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
##############################################################
## Configurations
##############################################################
env:
builder_ns: ghcr.io/open-rmf/rmf_deployment_template
base_registry: docker.io
domain_url: rmf-deployment-template.open-rmf.org
##############################################################
steps:
# ###
# Login to github packages, our container registry
# ###
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
-
name: Checkout
uses: actions/checkout@v3
-
name: Install and run vcs import rmf
run: |
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | \
sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update
sudo apt install python3-vcstool -y
mkdir rmf-src
vcs import rmf-src < rmf/rmf.repos
# ###
# build builder images
# ###
-
name: Build builder-rosdep
uses: docker/build-push-action@v3
with:
context: .
file: rmf/builder-rosdep.Dockerfile
build-args: |
BASE_REGISTRY=${{ env.base_registry }}
# push: true
tags: ${{ env.builder_ns }}/builder-rosdep:latest
-
name: Build builder-rmf
uses: docker/build-push-action@v3
with:
context: .
file: rmf/builder-rmf.Dockerfile
build-args: |
BUILDER_NS=${{ env.builder_ns }}
# push: true
tags: ${{ env.builder_ns }}/builder-rmf:latest
-
name: run vcs import rmf-web
run: |
mkdir rmf-web-src
vcs import rmf-web-src < rmf-web/rmf-web.repos
-
name: Build builder-rmf-web
uses: docker/build-push-action@v3
with:
context: .
file: rmf-web/builder-rmf-web.Dockerfile
build-args: |
BUILDER_NS=${{ env.builder_ns }}
# push: true
tags: ${{ env.builder_ns }}/builder-rmf-web:latest
-
name: run vcs import rmf-simulation
run: |
mkdir rmf-simulation-src
vcs import rmf-simulation-src < rmf-simulation/rmf-simulation.repos
-
name: Build builder-rmf-simulation
uses: docker/build-push-action@v3
with:
context: .
file: rmf-simulation/builder-rmf-simulation.Dockerfile
build-args: |
BUILDER_NS=${{ env.builder_ns }}
# push: true
tags: ${{ env.builder_ns }}/builder-rmf-simulation:latest
# ###
# build rmf image
# ###
-
name: Build rmf docker img
uses: docker/build-push-action@v3
with:
context: .
file: rmf/rmf.Dockerfile
build-args: |
BUILDER_NS=${{ env.builder_ns }}
push: true
tags: ${{ env.builder_ns }}/rmf:latest
# ###
# build rmf simulation images
# ###
-
name: Build rmf-simulation
uses: docker/build-push-action@v3
with:
context: .
file: rmf-simulation/rmf-simulation.Dockerfile
build-args: |
BUILDER_NS=${{ env.builder_ns }}
push: true
tags: ${{ env.builder_ns }}/rmf-simulation:latest
# ###
# build rmf web images
# ###
-
name: Build rmf-web-rmf-server
uses: docker/build-push-action@v3
with:
context: .
file: rmf-web/rmf-web-rmf-server.Dockerfile
build-args: |
BUILDER_NS=${{ env.builder_ns }}
push: true
tags: ${{ env.builder_ns }}/rmf-web-rmf-server:latest
-
name: Build rmf-web-dashboard
uses: docker/build-push-action@v3
with:
context: .
file: rmf-web/rmf-web-dashboard.Dockerfile
build-args: |
BASE_REGISTRY=${{ env.base_registry }}
DOMAIN_URL=${{ env.domain_url }}
BUILDER_NS=${{ env.builder_ns }}
push: true
tags: ${{ env.builder_ns }}/rmf-web-dashboard:latest