From dbb31774bf20acb2d95fe5d4fad19ebfb5825899 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Mon, 23 Sep 2024 15:12:33 +0800 Subject: [PATCH] Setting up matrix for rolling and jazzy Signed-off-by: Aaron Chong --- .github/workflows/nightly.yml | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 164e2aec9..01638869f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,8 +1,9 @@ name: Nightly -on: - schedule: - # 2am SGT - - cron: '0 18 * * *' +# on: +# schedule: +# # 2am SGT +# - cron: '0 18 * * *' +on: push concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -10,6 +11,9 @@ jobs: build-minimal-rmf-docker-images: name: Push minimal-rmf Docker image to GitHub Packages runs-on: ubuntu-24.04 + strategy: + matrix: + ros_distribution: [jazzy, rolling] steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -24,12 +28,17 @@ jobs: uses: docker/build-push-action@v5 with: push: true - tags: ghcr.io/${{ github.repository }}/minimal-rmf + build-args: | + ROS_DISTRO=${{ matrix.ros_distribution }} + tags: ghcr.io/${{ github.repository }}/minimal-rmf:${{ matrix.ros_distribution }} context: .github/minimal-rmf build-docker-images: needs: build-minimal-rmf-docker-images name: Push Docker images to GitHub Packages runs-on: ubuntu-24.04 + strategy: + matrix: + ros_distribution: [jazzy, rolling] steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -43,19 +52,19 @@ jobs: - name: Build and push dashboard uses: docker/build-push-action@v5 with: - push: true + push: false build-args: | - BASE_IMAGE=ghcr.io/${{ github.repository }}/minimal-rmf:latest - tags: ghcr.io/${{ github.repository }}/dashboard + BASE_IMAGE=ghcr.io/${{ github.repository }}/minimal-rmf:${{ matrix.ros_distribution }} + tags: ghcr.io/${{ github.repository }}/dashboard:${{ matrix.ros_distribution }} context: .github/dashboard - name: Build and push api-server uses: docker/build-push-action@v5 with: - push: true + push: false build-args: | - BASE_IMAGE=ghcr.io/${{ github.repository }}/minimal-rmf:latest - ROS_DISTRO=jazzy - tags: ghcr.io/${{ github.repository }}/api-server + ROS_DISTRO=${{ matrix.ros_distribution }} + BASE_IMAGE=ghcr.io/${{ github.repository }}/minimal-rmf:${{ matrix.ros_distribution }} + tags: ghcr.io/${{ github.repository }}/api-server:${{ matrix.ros_distribution }} context: .github/api-server # dashboard-e2e: # strategy: