Skip to content

Commit

Permalink
Build ros1-bridge-ws docker image with gh-action
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Nov 15, 2023
1 parent bc56b0f commit 1c69480
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-ros1-bridge-ws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build Docker Image for ros1-bridge-ws

on:
push:
branches:
- "master"
paths:
- .github/workflows/build-ros1-bridge-ws.yaml
- ros1_bridge_ws/docker/Dockerfile

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-ros1-bridge-ws/tags
images: ${{ secrets.DOCKERHUB_USERNAME }}/ros2-ros1-bridge-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: ros1_bridge_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/repository/docker/j3soon/ros2-template-ws/tags) | [`./template_ws`](./template_ws) | No |
| [j3soon/ros2-orbslam3-ws](https://hub.docker.com/repository/docker/j3soon/ros2-orbslam3-ws/tags) | [`./orbslam3_ws`](./orbslam3_ws) | No |
| [j3soon/ros2-ros1-bridge-ws](https://hub.docker.com/repository/docker/j3soon/ros2-ros1-bridge-ws/tags) | [`./ros1_bridge_ws`](./ros1_bridge_ws) | No |

## Supplementary

Expand Down

0 comments on commit 1c69480

Please sign in to comment.