Skip to content

Commit

Permalink
Build rtabmap-ws docker image with gh-action
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Mar 19, 2024
1 parent f089ef6 commit acd9918
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-rtabmap-ws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Docker Image for rtabmap-ws

on:
push:
branches:
- "master"
paths:
- .github/workflows/build-rtabmap-ws.yaml
- rtabmap_ws/docker/Dockerfile
- rtabmap_ws/docker/.dockerignore
- template_ws/docker/.bashrc

jobs:
docker:
if: github.repository == 'j3soon/ros2-agv-essentials'
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta
id: meta
# Ref: https://github.com/docker/metadata-action
uses: docker/metadata-action@v5
with:
# Link: https://hub.docker.com/repository/docker/j3soon/ros2-rtabmap-ws/tags
images: ${{ secrets.DOCKERHUB_USERNAME }}/ros2-rtabmap-ws
tags: |
type=raw,value={{date 'YYYYMMDD'}}
type=raw,value=latest
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: rtabmap_ws/docker
push: true
tags: ${{ steps.meta.outputs.tags }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Pulling the pre-built Docker images can bypass the time-consuming building proce
|--------------|-------------|--------------------------|
| [j3soon/ros2-template-ws](https://hub.docker.com/r/j3soon/ros2-template-ws/tags) | [`./template_ws`](./template_ws) | No |
| [j3soon/ros2-orbslam3-ws](https://hub.docker.com/r/j3soon/ros2-orbslam3-ws/tags) | [`./orbslam3_ws`](./orbslam3_ws) | No |
| [j3soon/ros2-rtabmap-ws](https://hub.docker.com/r/j3soon/ros2-rtabmap-ws/tags) | [`./rtabmap_ws`](./rtabmap_ws) | No |
| [j3soon/ros2-ros1-bridge-ws](https://hub.docker.com/r/j3soon/ros2-ros1-bridge-ws/tags) | [`./ros1_bridge_ws`](./ros1_bridge_ws) | No |
| [j3soon/ros2-ros1-bridge-build-ws](https://hub.docker.com/r/j3soon/ros2-ros1-bridge-build-ws/tags) | [`./ros1_bridge_ws`](./ros1_bridge_ws) | No |

Expand Down
2 changes: 2 additions & 0 deletions rtabmap_ws/docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.bashrc

0 comments on commit acd9918

Please sign in to comment.