From d5a18ba7d344cd4647136ea49b36ff28a1ac666e Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Tue, 3 Dec 2024 10:57:30 +0900 Subject: [PATCH 1/2] feat(.github): add `on:push:branches:` condition to `autoware-base` workflow (#5524) add paths arg Signed-off-by: Yutaka Kondo --- .github/workflows/autoware-base.yaml | 31 +++++++++------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/.github/workflows/autoware-base.yaml b/.github/workflows/autoware-base.yaml index e3d9720bcc4..72daa21e9cd 100644 --- a/.github/workflows/autoware-base.yaml +++ b/.github/workflows/autoware-base.yaml @@ -1,6 +1,14 @@ name: autoware-base on: + push: + branches: + - main + paths: + - docker/Dockerfile.base + - docker/scripts/cleanup_*.sh + - .github/actions/docker-build-and-push-base/* + - .github/workflows/autoware-base.yaml schedule: - cron: 0 0 15 * * # every 15th of the month workflow_dispatch: @@ -9,28 +17,9 @@ jobs: load-env: uses: ./.github/workflows/load-env.yaml - autoware-base-amd64: + autoware-base: needs: load-env runs-on: ubuntu-22.04 - steps: - - name: Check out this repository - uses: actions/checkout@v4 - - - name: Free disk space - uses: ./.github/actions/free-disk-space - - - name: Build Autoware's base images - uses: ./.github/actions/docker-build-and-push-base - with: - target-image: autoware-base - build-args: | - *.platform=linux/amd64 - *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} - *.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }} - - autoware-base-arm64: - needs: [load-env, autoware-base-amd64] - runs-on: ubuntu-22.04 steps: - name: Check out this repository uses: actions/checkout@v4 @@ -46,6 +35,6 @@ jobs: with: target-image: autoware-base build-args: | - *.platform=linux/arm64 + *.platform=linux/amd64,linux/arm64 *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} *.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }} From 9185662fe8cf0810c6dee63a07378b304cde4c2e Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Tue, 3 Dec 2024 10:58:17 +0900 Subject: [PATCH 2/2] fix(.github): not push manifest if eithor `amd64` or `arm64` image is missing (#5525) not push manifest if eithor amd64 or arm64 is missing Signed-off-by: Yutaka Kondo --- .github/actions/combine-multi-arch-images/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/combine-multi-arch-images/action.yaml b/.github/actions/combine-multi-arch-images/action.yaml index 8c446c5ff2c..43779450543 100644 --- a/.github/actions/combine-multi-arch-images/action.yaml +++ b/.github/actions/combine-multi-arch-images/action.yaml @@ -82,14 +82,14 @@ runs: amd64_image="${{ steps.set-image-name.outputs.image-name }}:$amd64_tag" else echo "No amd64 tag found for '$base_tag'." - amd64_image="" + continue fi if [ "$arm64_tag" != "" ]; then arm64_image="${{ steps.set-image-name.outputs.image-name }}:$arm64_tag" else echo "No arm64 tag found for '$base_tag'." - arm64_image="" + continue fi echo "amd64_image: $amd64_image"