-
Notifications
You must be signed in to change notification settings - Fork 32
66 lines (65 loc) · 1.78 KB
/
docker-build.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
name: Docker build
on:
workflow_dispatch:
push:
branches: ['main']
pull_request:
branches: ['main']
schedule:
- cron: '0 2 * * *'
jobs:
build_moveit2:
runs-on: ubuntu-20.04
steps:
- name: "Free up disk space"
run: |
sudo apt-get -qq purge "ghc*"
sudo apt-get clean
# cleanup docker images not used by us
docker system prune -af
# free up a lot of stuff from /usr/local
sudo rm -rf /usr/local
df -h
- name: Checkout
uses: actions/checkout@v2
- name: Set up buildx
uses: docker/setup-buildx-action@v1
- name: Build moveit2 image
uses: docker/build-push-action@v2
with:
context: moveit2
push: false
tags: openrobotics/moveit2:latest
cache-from: type=gha
cache-to: type=gha,mode=max
no-cache: false
outputs: type=docker,dest=/tmp/moveit2.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: moveit2
path: /tmp/moveit2.tar
build_space_robots:
runs-on: ubuntu-20.04
needs: build_moveit2
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: moveit2
path: /tmp/moveit2.tar
- name: Load image
run: |
docker load --input /tmp/moveit2.tar
docker image ls -a
- name: Build space robots demo image
uses: docker/build-push-action@v2
with:
context: space_robots
push: false
tags: space_robots
cache-from: type=gha
cache-to: type=gha,mode=max
no-cache: false