Skip to content

Commit

Permalink
Test docker (#3)
Browse files Browse the repository at this point in the history
* renamed cartesian limits file (moveit#472)

* Tutorial dockerfiles (moveit#463)

Build and push docker images for tutorials

* fixed clang complaints

* removed dockerhub pushes

* successfully ran htmlproofer

* removed chomp tutorial commits

* removed accidental commits

* Update CMakeLists.txt

* renamed mtc tutorial cpp file

* updated cmakelists

* updated cmakelists

* removed vscode

* refactored docker

* skipping base image

* added conditions on building base image

* added conditions on building base image

* added conditions on building base image

* ran pre commit

* Update .docker/Dockerfile

Co-authored-by: Robert Haschke <[email protected]>

* Update .docker/Dockerfile

Co-authored-by: Robert Haschke <[email protected]>

* resolved comments

* updated location to check for changes

* test change to dockerfile

* test change to dockerfile

* test change to dockerfile

* updated scripts to run only when dockerfile changes

* fixed syntax

* chaged to ros base image

* chaged to ros base image

* update

* removed ccache and change repo names

* removed ccache and change repo names

Co-authored-by: Henry Moore <[email protected]>
Co-authored-by: Robert Haschke <[email protected]>
  • Loading branch information
3 people committed Jul 26, 2022
1 parent 4ef6b14 commit 6db22aa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/docker-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
since_last_remote_commit: true
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
with:
since_last_remote_commit: true
files: |
.docker/Dockerfile
moveit2_tutorials.repos
doc/tutorials/*
- name: Set up Docker Buildx
if: steps.changed-files.outputs.any_changed == 'true'
uses: docker/setup-buildx-action@v2
- name: Login to Github Container Registry
if: steps.changed-files.outputs.any_changed == 'true' && env.PUSH == 'true'
if: steps.changed-files.outputs.any_changed == 'true'
uses: docker/login-action@v2
with:
registry: ghcr.io
Expand All @@ -58,3 +59,14 @@ jobs:
tags: |
${{ env.GH_IMAGE }}
# ${{ env.DH_IMAGE }}
- name: Build and Push PR Image
uses: docker/build-push-action@v3
if: steps.changed-files.outputs.any_changed == 'true' && env.PUSH == 'false' && github.event_name == 'pull_request'
with:
file: .docker/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
target: base_image
push: true
no-cache: false
tags: |
${{ env.GH_IMAGE }}-PR-${{ github.head_ref }}
16 changes: 13 additions & 3 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'ros-planning/moveit2_tutorials') }}

steps:
- name: Add -PR-<branch_name> to base image if this is a PR
if: github.event_name == 'pull_request'
run: |
echo "BASE_IMAGE_BRANCH=-PR-${{ github.head_ref }}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Github Container Registry
Expand All @@ -38,7 +42,9 @@ jobs:
uses: docker/build-push-action@v3
with:
file: .docker/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
build-args: |
ROS_DISTRO=${{ matrix.ROS_DISTRO }}
BASE_BRANCH=${{ env.BASE_IMAGE_BRANCH }}
target: hello_world_image
push: ${{ env.PUSH }}
no-cache: false
Expand All @@ -49,7 +55,9 @@ jobs:
uses: docker/build-push-action@v3
with:
file: .docker/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
build-args: |
ROS_DISTRO=${{ matrix.ROS_DISTRO }}
BASE_BRANCH=${{ env.BASE_IMAGE_BRANCH }}
target: planning_around_objects_image
push: ${{ env.PUSH }}
no-cache: false
Expand All @@ -60,7 +68,9 @@ jobs:
uses: docker/build-push-action@v3
with:
file: .docker/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
build-args: |
ROS_DISTRO=${{ matrix.ROS_DISTRO }}
BASE_BRANCH=${{ env.BASE_IMAGE_BRANCH }}
target: pick_and_place_image
push: ${{ env.PUSH }}
no-cache: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
paths:
- moveit2_tutorials.repos
- .docker/**
- doc/**
- doc/tutorials/**

jobs:
call-docker-base:
Expand Down

0 comments on commit 6db22aa

Please sign in to comment.