From 0708897b2df8335a92846c244909326a3559d4df Mon Sep 17 00:00:00 2001 From: otani88 Date: Wed, 20 Nov 2024 09:26:06 +0200 Subject: [PATCH 1/3] ci: fix tags processing in core reusable template --- .github/workflows/new-build-core-template.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/new-build-core-template.yml b/.github/workflows/new-build-core-template.yml index ab3854733e62..64bd8734dcc9 100644 --- a/.github/workflows/new-build-core-template.yml +++ b/.github/workflows/new-build-core-template.yml @@ -197,13 +197,6 @@ jobs: shell: bash run: | echo PLATFORM=$(echo ${{ matrix.platforms }} | tr '/' '-') >> $GITHUB_ENV - echo IMAGE_TAG_SHA=$(git rev-parse --short HEAD) >> $GITHUB_ENV - # Support for custom tag suffix - if [ -n "${{ inputs.image_tag_suffix }}" ]; then - echo IMAGE_TAG_SHA_TS="${{ inputs.image_tag_suffix }}" >> $GITHUB_ENV - else - echo IMAGE_TAG_SHA_TS=$(git rev-parse --short HEAD)-$(date +%s) >> $GITHUB_ENV - fi - name: Download contracts uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 @@ -232,14 +225,14 @@ jobs: SCCACHE_GCS_RW_MODE=READ_WRITE RUSTC_WRAPPER=sccache tags: | - us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }} - matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }} + us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SUFFIX }}-${{ env.PLATFORM }} + matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SUFFIX }}-${{ env.PLATFORM }} - name: Push docker image if: ${{ inputs.action == 'push' }} run: | - docker push us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }} - docker push matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }} + docker push us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SUFFIX }}-${{ env.PLATFORM }} + docker push matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SUFFIX }}-${{ env.PLATFORM }} create_manifest: name: Create release manifest From 68f82acb29972a1791d2ee43e036913b9c09dd1c Mon Sep 17 00:00:00 2001 From: otani88 Date: Wed, 20 Nov 2024 09:32:39 +0200 Subject: [PATCH 2/3] ci: fix tags processing in core reusable template --- .github/workflows/new-build-core-template.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-build-core-template.yml b/.github/workflows/new-build-core-template.yml index 64bd8734dcc9..6272bf5fb8b4 100644 --- a/.github/workflows/new-build-core-template.yml +++ b/.github/workflows/new-build-core-template.yml @@ -197,6 +197,13 @@ jobs: shell: bash run: | echo PLATFORM=$(echo ${{ matrix.platforms }} | tr '/' '-') >> $GITHUB_ENV + echo IMAGE_TAG_SHA=${{ env.IMAGE_TAG_SUFFIX }} >> $GITHUB_ENV + # Support for custom tag suffix + if [ -n "${{ inputs.image_tag_suffix }}" ]; then + echo IMAGE_TAG_SHA_TS="${{ env.IMAGE_TAG_SUFFIX }}" >> $GITHUB_ENV + else + echo IMAGE_TAG_SHA_TS=$(git rev-parse --short HEAD)-$(date +%s) >> $GITHUB_ENV + fi - name: Download contracts uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 @@ -225,14 +232,14 @@ jobs: SCCACHE_GCS_RW_MODE=READ_WRITE RUSTC_WRAPPER=sccache tags: | - us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SUFFIX }}-${{ env.PLATFORM }} - matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SUFFIX }}-${{ env.PLATFORM }} + us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }} + matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }} - name: Push docker image if: ${{ inputs.action == 'push' }} run: | - docker push us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SUFFIX }}-${{ env.PLATFORM }} - docker push matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SUFFIX }}-${{ env.PLATFORM }} + docker push us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }} + docker push matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }} create_manifest: name: Create release manifest From 2fef67fb35ba5b7caa65b5ba34eedb61c809b452 Mon Sep 17 00:00:00 2001 From: otani88 Date: Wed, 20 Nov 2024 09:33:53 +0200 Subject: [PATCH 3/3] ci: fix tags processing in core reusable template --- .github/workflows/new-build-core-template.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/new-build-core-template.yml b/.github/workflows/new-build-core-template.yml index 6272bf5fb8b4..557d8455a31d 100644 --- a/.github/workflows/new-build-core-template.yml +++ b/.github/workflows/new-build-core-template.yml @@ -197,8 +197,6 @@ jobs: shell: bash run: | echo PLATFORM=$(echo ${{ matrix.platforms }} | tr '/' '-') >> $GITHUB_ENV - echo IMAGE_TAG_SHA=${{ env.IMAGE_TAG_SUFFIX }} >> $GITHUB_ENV - # Support for custom tag suffix if [ -n "${{ inputs.image_tag_suffix }}" ]; then echo IMAGE_TAG_SHA_TS="${{ env.IMAGE_TAG_SUFFIX }}" >> $GITHUB_ENV else