From d0536ca3dcaaaefa9aee4531d6c07f3ea5279570 Mon Sep 17 00:00:00 2001 From: oguzkaganozt Date: Sat, 21 Sep 2024 10:33:31 +0300 Subject: [PATCH] fix(docker): add platform tag and increase frequency of multi-arch manifest workflow (#5256) add platform to the tag and increase frequency of multi-arch manifest workflow Signed-off-by: Oguz Ozturk --- .../actions/docker-build-and-push/action.yaml | 40 +++++++++---------- .../docker-build-and-push-arm64.yaml | 7 ++-- .github/workflows/docker-build-and-push.yaml | 6 +-- .github/workflows/update-docker-manifest.yaml | 2 +- 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 23eec646837..903ef8de109 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -78,8 +78,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=base$${{ inputs.tag-suffix }} - type=raw,value=base$${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=base${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=base${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-base flavor: | latest=false @@ -90,8 +90,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=core-devel${{ inputs.tag-suffix }} - type=raw,value=core-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=core-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=core-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-core-devel flavor: | latest=false @@ -102,8 +102,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }} - type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-sensing-perception-devel flavor: | latest=false @@ -114,8 +114,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }} - type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-sensing-perception flavor: | latest=false @@ -126,8 +126,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }} - type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-localization-mapping-devel flavor: | latest=false @@ -138,8 +138,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }} - type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-localization-mapping flavor: | latest=false @@ -150,8 +150,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }} - type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-planning-control-devel flavor: | latest=false @@ -162,8 +162,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-planning-control${{ inputs.tag-suffix }} - type=raw,value=universe-planning-control${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=universe-planning-control${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-planning-control${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-planning-control flavor: | latest=false @@ -174,8 +174,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-devel${{ inputs.tag-suffix }} - type=raw,value=universe-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=universe-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-devel flavor: | latest=false @@ -186,8 +186,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe${{ inputs.tag-suffix }} - type=raw,value=universe${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + type=raw,value=universe${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe flavor: | latest=auto diff --git a/.github/workflows/docker-build-and-push-arm64.yaml b/.github/workflows/docker-build-and-push-arm64.yaml index 9a4dcc46950..c262f0944a1 100644 --- a/.github/workflows/docker-build-and-push-arm64.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -26,12 +26,12 @@ jobs: base_image_env: base_image lib_dir: aarch64 setup-args: --no-nvidia - additional-tag-suffix: "" + tag-suffix: "" - name: cuda platform: arm64 base_image_env: base_image lib_dir: aarch64 - additional-tag-suffix: -cuda + tag-suffix: -cuda steps: # https://github.com/actions/checkout/issues/211 - name: Change permission of workspace @@ -80,8 +80,7 @@ jobs: *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }} *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max - tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }} - tag-prefix: ${{ needs.load-env.outputs.rosdistro }} + tag-suffix: ${{ matrix.tag-suffix }} - name: Show disk space run: | diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index 46bb19c734c..025d6e7485c 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -26,12 +26,12 @@ jobs: base_image_env: base_image lib_dir: x86_64 setup-args: --no-nvidia - additional-tag-suffix: "" + tag-suffix: "" - name: cuda platform: amd64 base_image_env: base_image lib_dir: x86_64 - additional-tag-suffix: -cuda + tag-suffix: -cuda steps: - name: Check out repository uses: actions/checkout@v4 @@ -75,7 +75,7 @@ jobs: *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }} *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max - tag-suffix: ${{ matrix.additional-tag-suffix }} + tag-suffix: ${{ matrix.tag-suffix }} - name: Show disk space run: | diff --git a/.github/workflows/update-docker-manifest.yaml b/.github/workflows/update-docker-manifest.yaml index a0539b037ed..af9324fb162 100644 --- a/.github/workflows/update-docker-manifest.yaml +++ b/.github/workflows/update-docker-manifest.yaml @@ -2,7 +2,7 @@ name: update-docker-manifest on: schedule: - - cron: 0 0 * * * + - cron: 0 */2 * * * workflow_dispatch: jobs: