From d9c51557e4995186095345c5018db03945305526 Mon Sep 17 00:00:00 2001 From: Johnson Sun Date: Fri, 9 Aug 2024 00:17:47 +0800 Subject: [PATCH] ci(vlp_ws): Add amd64 and arm64 CI --- .github/workflows/build-vlp-ws.yaml | 49 +++++++++++++++++++++++++++++ README.md | 1 + vlp_ws/docker/.dockerignore | 2 ++ 3 files changed, 52 insertions(+) create mode 100644 .github/workflows/build-vlp-ws.yaml create mode 100644 vlp_ws/docker/.dockerignore diff --git a/.github/workflows/build-vlp-ws.yaml b/.github/workflows/build-vlp-ws.yaml new file mode 100644 index 00000000..33aeef7d --- /dev/null +++ b/.github/workflows/build-vlp-ws.yaml @@ -0,0 +1,49 @@ +name: Build Docker Image for vlp-ws + +on: + push: + branches: + - "master" + paths: + - .github/workflows/build-vlp-ws.yaml + - vlp_ws/docker/Dockerfile + - vlp_ws/docker/.dockerignore + - vlp_ws/docker/.bashrc + +jobs: + docker: + if: github.repository == 'j3soon/ros2-essentials' + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@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-vlp-ws/tags + images: ${{ secrets.DOCKERHUB_USERNAME }}/ros2-vlp-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: vlp_ws/docker + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} diff --git a/README.md b/README.md index ead4a213..803508c2 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Pulling the pre-built Docker images can bypass the time-consuming building proce | [j3soon/ros2-cartographer-ws](https://hub.docker.com/r/j3soon/ros2-cartographer-ws/tags) | [`./cartographer_ws`](./cartographer_ws) | ✔️ | ❌ | | [j3soon/ros2-husky-ws](https://hub.docker.com/r/j3soon/ros2-husky-ws/tags) | [`./husky_ws`](./husky_ws) | ✔️ | ✔️ | | [j3soon/ros2-kobuki-ws](https://hub.docker.com/r/j3soon/ros2-kobuki-ws/tags) | [`./kobuki_ws`](./kobuki_ws) | ✔️ | ✔️ | +| [j3soon/ros2-vlp-ws](https://hub.docker.com/r/j3soon/ros2-vlp-ws/tags) | [`./vlp_ws`](./vlp_ws) | ✔️ | ✔️ | ## Contributors diff --git a/vlp_ws/docker/.dockerignore b/vlp_ws/docker/.dockerignore new file mode 100644 index 00000000..4901728d --- /dev/null +++ b/vlp_ws/docker/.dockerignore @@ -0,0 +1,2 @@ +* +!.bashrc