-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (59 loc) · 2.12 KB
/
main.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
name: Docker Images CI
on:
schedule:
- cron: "30 15 * * 2-5"
workflow_dispatch:
jobs:
build-tour-docker:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- {
ros2_distro: "humble",
base_image: "nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04",
base_image_label: "cuda.11.7.1-cudnn8",
}
steps:
- name: Info
run: |
echo "Event type: ${{github.event_name}}"
- name: Change docker to experimental mode
run: |
sudo rm -rf /etc/docker/daemon.json
echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json
- name: Restart docker daemon
run: sudo systemctl restart docker
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the r1ObjectRetrievalSim Docker image
working-directory: docker/docker_r1ObjectRetrievalSim/
run: |
if [ ${{ github.event_name }} == 'schedule' ]; then
echo "Building r1ObjectRetrievalSim image"
sudo rm -rf /opt/hostedtoolcache
sudo docker build --build-arg ros_distro=${{matrix.config.ros2_distro}} -t colombraf/r1images:r1ObjectRetrievalSim .
elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
echo "Building r1ObjectRetrievalSim image"
sudo rm -rf /opt/hostedtoolcache
sudo docker build --build-arg ros_distro=${{matrix.config.ros2_distro}} -t colombraf/r1images:r1ObjectRetrievalSim .
else
echo "Failure!"
exit 1
fi
- name: Push r1ObjectRetrievalSim image
run: |
if [ ${{ github.event_name }} == 'schedule' ]; then
echo "Pushing r1ObjectRetrievalSim image"
docker push colombraf/r1images:r1ObjectRetrievalSim
elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
echo "Pushing r1ObjectRetrievalSim image"
docker push colombraf/r1images:r1ObjectRetrievalSim
else
echo "Failure!"
exit 1
fi