From c73aaf0ac10541d3bdb4017f8dcebbeb5ee124c3 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Thu, 6 Jun 2024 22:26:13 +0900 Subject: [PATCH] feat(ci): add CPU architecture suffixes to the Docker build cache (#4826) * add arch prefix Signed-off-by: Yutaka Kondo * rename Signed-off-by: Yutaka Kondo * use lib_dir Signed-off-by: Yutaka Kondo * change suffix Signed-off-by: Yutaka Kondo --------- Signed-off-by: Yutaka Kondo --- .github/workflows/build-main-self-hosted.yaml | 4 ++-- .github/workflows/build-main.yaml | 4 ++-- .github/workflows/docker-build-and-push-main-self-hosted.yaml | 4 ++-- .github/workflows/docker-build-and-push-main.yaml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-main-self-hosted.yaml b/.github/workflows/build-main-self-hosted.yaml index c0fbe3f21b..d83234253f 100644 --- a/.github/workflows/build-main-self-hosted.yaml +++ b/.github/workflows/build-main-self-hosted.yaml @@ -73,8 +73,8 @@ jobs: *.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }} *.args.SETUP_ARGS=${{ matrix.setup-args }} *.args.LIB_DIR=${{ matrix.lib_dir }} - *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }} - *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }},mode=max + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-arm64 + *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-arm64,mode=max tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64 tag-prefix: ${{ needs.load-env.outputs.rosdistro }} allow-push: false diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 5beada5531..953f93492b 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -68,8 +68,8 @@ jobs: *.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }} *.args.SETUP_ARGS=${{ matrix.setup-args }} *.args.LIB_DIR=${{ matrix.lib_dir }} - *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }} - *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }},mode=max + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-amd64 + *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-amd64,mode=max tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64 tag-prefix: ${{ needs.load-env.outputs.rosdistro }} allow-push: false diff --git a/.github/workflows/docker-build-and-push-main-self-hosted.yaml b/.github/workflows/docker-build-and-push-main-self-hosted.yaml index 772ba389e8..f5066a2c9c 100644 --- a/.github/workflows/docker-build-and-push-main-self-hosted.yaml +++ b/.github/workflows/docker-build-and-push-main-self-hosted.yaml @@ -85,8 +85,8 @@ jobs: *.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }} *.args.SETUP_ARGS=${{ matrix.setup-args }} *.args.LIB_DIR=${{ matrix.lib_dir }} - *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }} - *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }},mode=max + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-arm64 + *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-arm64,mode=max tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64 tag-prefix: ${{ needs.load-env.outputs.rosdistro }} allow-push: true diff --git a/.github/workflows/docker-build-and-push-main.yaml b/.github/workflows/docker-build-and-push-main.yaml index 118ba5413e..430b6dbe03 100644 --- a/.github/workflows/docker-build-and-push-main.yaml +++ b/.github/workflows/docker-build-and-push-main.yaml @@ -80,8 +80,8 @@ jobs: *.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }} *.args.SETUP_ARGS=${{ matrix.setup-args }} *.args.LIB_DIR=${{ matrix.lib_dir }} - *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }} - *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }},mode=max + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-amd64 + *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-amd64,mode=max tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64 tag-prefix: ${{ needs.load-env.outputs.rosdistro }} allow-push: true