Docker build #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker build | |
on: | |
workflow_dispatch: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
space_robots: | |
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: Login to ghcr | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- 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 | |
build-args: | | |
SPACE_ROS_IMAGE=osrf/space-ros:main | |
outputs: type=docker,dest=/tmp/moveit2.tar | |
- name: Build space robots demo image | |
run: | | |
docker load --input /tmp/moveit2.tar | |
docker images | |
cd space_robots && ./build.sh | |
space_nav2: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build space_nav2 image | |
uses: docker/build-push-action@v2 | |
with: | |
context: navigation2 | |
push: false | |
tags: osrf/space_nav2:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
no-cache: false | |
build-args: | | |
SPACE_ROS_IMAGE=osrf/space-ros:main |