From e4bf9477144e9c0ad4472f843d906c44b609880a Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 30 May 2024 09:09:59 +0200 Subject: [PATCH 01/14] add chain-spec-builder image --- .../workflows/release-50_publish-docker.yml | 23 +++++++++++++++---- docker/dockerfiles/binary_injected.Dockerfile | 2 +- .../chain-spec-builder/build-injected.sh | 14 +++++++++++ .../scripts/chain-spec-builder/test-build.sh | 19 +++++++++++++++ 4 files changed, 53 insertions(+), 5 deletions(-) create mode 100755 docker/scripts/chain-spec-builder/build-injected.sh create mode 100755 docker/scripts/chain-spec-builder/test-build.sh diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index 67e93ee96574..fda00a8e3a79 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -27,6 +27,7 @@ on: options: - polkadot - polkadot-parachain + - chain-spec-builder release_id: description: | @@ -106,6 +107,14 @@ jobs: fetch_release_artifacts_from_s3 + - name: Fetch chain-spec-builder rc artifacts or release artifacts based on release id + #this step runs only if the workflow is triggered manually and only for chain-spec-builder + if: ${{ env.EVENT_NAME == 'workflow_dispatch' && inputs.binary == 'chain-spec-builder' }} + run: | + . ./.github/scripts/common/lib.sh + + fetch_release_artifacts + - name: Cache the artifacts uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 with: @@ -114,7 +123,7 @@ jobs: ./release-artifacts/${{ env.BINARY }}/**/* build-container: # this job will be triggered for the polkadot-parachain rc and release or polkadot rc image build - if: ${{ inputs.binary == 'polkadot-parachain' || inputs.image_type == 'rc' }} + if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'chain-spec-builder' || inputs.image_type == 'rc' }} runs-on: ubuntu-latest needs: fetch-artifacts environment: release @@ -132,6 +141,7 @@ jobs: ./release-artifacts/${{ env.BINARY }}/**/* - name: Check sha256 ${{ env.BINARY }} + if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'polkadot' }} working-directory: ./release-artifacts/${{ env.BINARY }} run: | . ../../.github/scripts/common/lib.sh @@ -140,6 +150,7 @@ jobs: check_sha256 $BINARY && echo "OK" || echo "ERR" - name: Check GPG ${{ env.BINARY }} + if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'polkadot' }} working-directory: ./release-artifacts/${{ env.BINARY }} run: | . ../../.github/scripts/common/lib.sh @@ -169,13 +180,17 @@ jobs: id: fetch_release_refs run: | chmod a+rx $BINARY - VERSION=$(./$BINARY --version | awk '{ print $2 }' ) + if [[ $BINARY == 'chain-speck-builder' ]]; then + VERSION=${{ env.VERSION }} + else + VERSION=$(./$BINARY --version | awk '{ print $2 }' ) + fi release=$( echo $VERSION | cut -f1 -d- ) echo "tag=latest" >> $GITHUB_OUTPUT echo "release=${release}" >> $GITHUB_OUTPUT - - name: Build Injected Container image for polkadot rc - if: ${{ env.BINARY == 'polkadot' }} + - name: Build Injected Container image for polkadot rc or chain-spec-builder + if: ${{ env.BINARY == 'polkadot' || env.BINARY == 'chain-spec-builder' }} env: ARTIFACTS_FOLDER: ./release-artifacts IMAGE_NAME: ${{ env.BINARY }} diff --git a/docker/dockerfiles/binary_injected.Dockerfile b/docker/dockerfiles/binary_injected.Dockerfile index c8930bd83f02..26c0ef7ae641 100644 --- a/docker/dockerfiles/binary_injected.Dockerfile +++ b/docker/dockerfiles/binary_injected.Dockerfile @@ -32,7 +32,7 @@ LABEL io.parity.image.authors=${AUTHORS} \ USER root WORKDIR /app -# add polkadot binary to docker image +# add binary to docker image # sample for polkadot: COPY ./polkadot ./polkadot-*-worker /usr/local/bin/ COPY entrypoint.sh . COPY "bin/*" "/usr/local/bin/" diff --git a/docker/scripts/chain-spec-builder/build-injected.sh b/docker/scripts/chain-spec-builder/build-injected.sh new file mode 100755 index 000000000000..ede6cee38513 --- /dev/null +++ b/docker/scripts/chain-spec-builder/build-injected.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Sample call: +# $0 /path/to/folder_with_binary +# This script replace the former dedicated Dockerfile +# and shows how to use the generic binary_injected.dockerfile + +PROJECT_ROOT=`git rev-parse --show-toplevel` + +export BINARY=chain-spec-builder +export ARTIFACTS_FOLDER=$1 +# export TAGS=... + +$PROJECT_ROOT/docker/scripts/build-injected.sh diff --git a/docker/scripts/chain-spec-builder/test-build.sh b/docker/scripts/chain-spec-builder/test-build.sh new file mode 100755 index 000000000000..a42cab977034 --- /dev/null +++ b/docker/scripts/chain-spec-builder/test-build.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +TMP=$(mktemp -d) +ENGINE=${ENGINE:-podman} + +export TAGS=latest,beta,7777,1.0.2-rc23 + +# Fetch some binaries +$ENGINE run --user root --rm -i \ + --pull always \ + -v "$TMP:/export" \ + --entrypoint /bin/bash \ + parity/chain-spec-builder -c \ + 'cp "$(which chain-spec-builder)" /export' + +echo "Checking binaries we got:" +ls -al $TMP + +./build-injected.sh $TMP From 3a98c0ca74c5701904ce5caa9c90cef8ace86bda Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 30 May 2024 16:24:31 +0200 Subject: [PATCH 02/14] add condition to trigger flow --- .github/workflows/release-50_publish-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index fda00a8e3a79..d6a960cdb43a 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -75,7 +75,7 @@ env: jobs: fetch-artifacts: # this job will be triggered for the polkadot-parachain rc and release or polkadot rc image build - if: ${{ inputs.binary == 'polkadot-parachain' || inputs.image_type == 'rc' }} + if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'chain-spec-builder' || inputs.image_type == 'rc' }} runs-on: ubuntu-latest steps: From 1ebf626fe5eac49b6502ec35da41025de1e2debd Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 30 May 2024 16:31:07 +0200 Subject: [PATCH 03/14] chnage trigger conditions for the s3 fetch --- .github/workflows/release-50_publish-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index d6a960cdb43a..6671c6ce74cb 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -98,7 +98,7 @@ jobs: - name: Fetch rc artifacts or release artifacts from s3 based on version #this step runs only if the workflow is triggered manually - if: ${{ env.EVENT_NAME == 'workflow_dispatch' }} + if: ${{ env.EVENT_NAME == 'workflow_dispatch' && inputs.binary != 'chain-spec-builder'}} run: | . ./.github/scripts/common/lib.sh From 22fc9a15f26b6f5ae27838f49e35a517a4eab948 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 30 May 2024 16:55:29 +0200 Subject: [PATCH 04/14] debug --- .github/scripts/common/lib.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/scripts/common/lib.sh b/.github/scripts/common/lib.sh index f844e962c41d..f14fcf17979f 100755 --- a/.github/scripts/common/lib.sh +++ b/.github/scripts/common/lib.sh @@ -213,6 +213,7 @@ fetch_release_artifacts() { https://api.github.com/repos/${REPO}/releases/${RELEASE_ID} > release.json echo "Extract asset ids..." + cat release.json ids=($(jq -r '.assets[].id' < release.json )) echo "Extract asset count..." count=$(jq '.assets|length' < release.json ) From f51ab55d366f6df200eefd0941f9ba11ce0a4280 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 30 May 2024 17:00:15 +0200 Subject: [PATCH 05/14] add RELEASE_ID to the fetch chain-spec builder step --- .github/scripts/common/lib.sh | 1 - .github/workflows/release-50_publish-docker.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/scripts/common/lib.sh b/.github/scripts/common/lib.sh index f14fcf17979f..f844e962c41d 100755 --- a/.github/scripts/common/lib.sh +++ b/.github/scripts/common/lib.sh @@ -213,7 +213,6 @@ fetch_release_artifacts() { https://api.github.com/repos/${REPO}/releases/${RELEASE_ID} > release.json echo "Extract asset ids..." - cat release.json ids=($(jq -r '.assets[].id' < release.json )) echo "Extract asset count..." count=$(jq '.assets|length' < release.json ) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index 6671c6ce74cb..f6b1c8420819 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -112,7 +112,7 @@ jobs: if: ${{ env.EVENT_NAME == 'workflow_dispatch' && inputs.binary == 'chain-spec-builder' }} run: | . ./.github/scripts/common/lib.sh - + RELEASE_ID=$(check_release_id "${{ inputs.release_id }}") fetch_release_artifacts - name: Cache the artifacts From 0bea851a3e2dec79225bc25f1edb166a7cef1f2e Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 30 May 2024 17:29:12 +0200 Subject: [PATCH 06/14] adjust flow --- .github/workflows/release-50_publish-docker.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index f6b1c8420819..72df5b9de90a 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -180,11 +180,8 @@ jobs: id: fetch_release_refs run: | chmod a+rx $BINARY - if [[ $BINARY == 'chain-speck-builder' ]]; then - VERSION=${{ env.VERSION }} - else - VERSION=$(./$BINARY --version | awk '{ print $2 }' ) - fi + [[ $BINARY != 'chain-speck-builder' ]] && VERSION=$(./$BINARY --version | awk '{ print $2 }' ) + release=$( echo $VERSION | cut -f1 -d- ) echo "tag=latest" >> $GITHUB_OUTPUT echo "release=${release}" >> $GITHUB_OUTPUT @@ -234,7 +231,11 @@ jobs: RELEASE_TAG: ${{ steps.fetch_rc_refs.outputs.release || steps.fetch_release_refs.outputs.release }} run: | echo "Checking tag ${RELEASE_TAG} for image ${REGISTRY}/${DOCKER_OWNER}/${BINARY}" - $ENGINE run -i ${REGISTRY}/${DOCKER_OWNER}/${BINARY}:${RELEASE_TAG} --version + if [[ ${BINARY} == 'chain-spec-builder' ]]; then + $ENGINE run -i ${REGISTRY}/${DOCKER_OWNER}/${BINARY}:${RELEASE_TAG} + else + $ENGINE run -i ${REGISTRY}/${DOCKER_OWNER}/${BINARY}:${RELEASE_TAG} --version + fi fetch-latest-debian-package-version: # this job will be triggered for polkadot release build if: ${{ inputs.binary == 'polkadot' && inputs.image_type == 'release' }} From c81bef2b4cc12de488425bd591be9033c2300060 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 30 May 2024 17:40:22 +0200 Subject: [PATCH 07/14] fix typo --- .github/workflows/release-50_publish-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index 72df5b9de90a..0ae54143c962 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -180,7 +180,7 @@ jobs: id: fetch_release_refs run: | chmod a+rx $BINARY - [[ $BINARY != 'chain-speck-builder' ]] && VERSION=$(./$BINARY --version | awk '{ print $2 }' ) + [[ $BINARY != 'chain-spec-builder' ]] && VERSION=$(./$BINARY --version | awk '{ print $2 }' ) release=$( echo $VERSION | cut -f1 -d- ) echo "tag=latest" >> $GITHUB_OUTPUT From 956ff783c32b7c4b3631051ec3d8ec13e2f9a984 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 31 May 2024 11:36:39 +0200 Subject: [PATCH 08/14] do not use cache --- .../workflows/release-50_publish-docker.yml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index 0ae54143c962..bf1f0b4bb586 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -115,12 +115,12 @@ jobs: RELEASE_ID=$(check_release_id "${{ inputs.release_id }}") fetch_release_artifacts - - name: Cache the artifacts - uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 - with: - key: artifacts-${{ env.BINARY }}-${{ github.sha }} - path: | - ./release-artifacts/${{ env.BINARY }}/**/* + # - name: Cache the artifacts + # uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 + # with: + # key: artifacts-${{ env.BINARY }}-${{ github.sha }} + # path: | + # ./release-artifacts/${{ env.BINARY }}/**/* build-container: # this job will be triggered for the polkadot-parachain rc and release or polkadot rc image build if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'chain-spec-builder' || inputs.image_type == 'rc' }} @@ -132,13 +132,13 @@ jobs: - name: Checkout sources uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Get artifacts from cache - uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 - with: - key: artifacts-${{ env.BINARY }}-${{ github.sha }} - fail-on-cache-miss: true - path: | - ./release-artifacts/${{ env.BINARY }}/**/* + # - name: Get artifacts from cache + # uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 + # with: + # key: artifacts-${{ env.BINARY }}-${{ github.sha }} + # fail-on-cache-miss: true + # path: | + # ./release-artifacts/${{ env.BINARY }}/**/* - name: Check sha256 ${{ env.BINARY }} if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'polkadot' }} From eea08a800fd6828294d1a40e7d0a0aadd6f85245 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 31 May 2024 11:50:09 +0200 Subject: [PATCH 09/14] add uplaod/download artifacts instead of a cache --- .github/workflows/release-50_publish-docker.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index bf1f0b4bb586..0eb9b685f987 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -115,6 +115,11 @@ jobs: RELEASE_ID=$(check_release_id "${{ inputs.release_id }}") fetch_release_artifacts + - name: Upload artifacts + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + with: + path: ./release-artifacts/${{ env.BINARY }}/**/* + # - name: Cache the artifacts # uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 # with: @@ -132,6 +137,9 @@ jobs: - name: Checkout sources uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Download artifacts + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + # - name: Get artifacts from cache # uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 # with: From 00de56ba4f123ae856548c954576bfc53aa3b432 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 31 May 2024 11:56:38 +0200 Subject: [PATCH 10/14] debug --- .github/workflows/release-50_publish-docker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index 0eb9b685f987..38ecadf96ef4 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -114,11 +114,12 @@ jobs: . ./.github/scripts/common/lib.sh RELEASE_ID=$(check_release_id "${{ inputs.release_id }}") fetch_release_artifacts + ls -la - name: Upload artifacts uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: - path: ./release-artifacts/${{ env.BINARY }}/**/* + path: release-artifacts/${{ env.BINARY }}/**/* # - name: Cache the artifacts # uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 From 432d0ecd04a73489cb5750c5e0fe540a0a4e2794 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 31 May 2024 12:02:10 +0200 Subject: [PATCH 11/14] fix path to the artifacts --- .github/workflows/release-50_publish-docker.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index 38ecadf96ef4..7c96a0bf1a6b 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -114,11 +114,11 @@ jobs: . ./.github/scripts/common/lib.sh RELEASE_ID=$(check_release_id "${{ inputs.release_id }}") fetch_release_artifacts - ls -la - name: Upload artifacts uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: + name: release-artifacts path: release-artifacts/${{ env.BINARY }}/**/* # - name: Cache the artifacts @@ -151,7 +151,7 @@ jobs: - name: Check sha256 ${{ env.BINARY }} if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'polkadot' }} - working-directory: ./release-artifacts/${{ env.BINARY }} + working-directory: release-artifacts/${{ env.BINARY }} run: | . ../../.github/scripts/common/lib.sh @@ -160,7 +160,7 @@ jobs: - name: Check GPG ${{ env.BINARY }} if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'polkadot' }} - working-directory: ./release-artifacts/${{ env.BINARY }} + working-directory: release-artifacts/${{ env.BINARY }} run: | . ../../.github/scripts/common/lib.sh import_gpg_keys @@ -184,7 +184,7 @@ jobs: echo "No tag, doing without" - name: Fetch release tags - working-directory: ./release-artifacts/${{ env.BINARY }} + working-directory: release-artifacts/${{ env.BINARY }} if: ${{ env.IMAGE_TYPE == 'release'}} id: fetch_release_refs run: | @@ -198,7 +198,7 @@ jobs: - name: Build Injected Container image for polkadot rc or chain-spec-builder if: ${{ env.BINARY == 'polkadot' || env.BINARY == 'chain-spec-builder' }} env: - ARTIFACTS_FOLDER: ./release-artifacts + ARTIFACTS_FOLDER: release-artifacts IMAGE_NAME: ${{ env.BINARY }} OWNER: ${{ env.DOCKER_OWNER }} TAGS: ${{ join(steps.fetch_rc_refs.outputs.*, ',') || join(steps.fetch_release_refs.outputs.*, ',') }} @@ -210,7 +210,7 @@ jobs: - name: Build Injected Container image for polkadot-parachain if: ${{ env.BINARY == 'polkadot-parachain' }} env: - ARTIFACTS_FOLDER: ./release-artifacts + ARTIFACTS_FOLDER: release-artifacts IMAGE_NAME: ${{ env.BINARY }} OWNER: ${{ env.DOCKER_OWNER }} DOCKERFILE: docker/dockerfiles/polkadot-parachain/polkadot-parachain_injected.Dockerfile From 12741f16e989fc53d7ce597f988e9373b0bfbbf7 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 31 May 2024 12:06:11 +0200 Subject: [PATCH 12/14] fix path for artifact upload --- .github/workflows/release-50_publish-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index 7c96a0bf1a6b..ffbd92897bc8 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -118,7 +118,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: - name: release-artifacts + name: release-artifacts/${{ env.BINARY }} path: release-artifacts/${{ env.BINARY }}/**/* # - name: Cache the artifacts From ea29bb37b8f4f943fb96b7c2cfaddf42ab664668 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 31 May 2024 12:09:40 +0200 Subject: [PATCH 13/14] fix path for working directory --- .../workflows/release-50_publish-docker.yml | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index ffbd92897bc8..2fa5c82ead72 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -118,16 +118,9 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: - name: release-artifacts/${{ env.BINARY }} + name: release-artifacts path: release-artifacts/${{ env.BINARY }}/**/* - # - name: Cache the artifacts - # uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 - # with: - # key: artifacts-${{ env.BINARY }}-${{ github.sha }} - # path: | - # ./release-artifacts/${{ env.BINARY }}/**/* - build-container: # this job will be triggered for the polkadot-parachain rc and release or polkadot rc image build if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'chain-spec-builder' || inputs.image_type == 'rc' }} runs-on: ubuntu-latest @@ -141,17 +134,9 @@ jobs: - name: Download artifacts uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - # - name: Get artifacts from cache - # uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 - # with: - # key: artifacts-${{ env.BINARY }}-${{ github.sha }} - # fail-on-cache-miss: true - # path: | - # ./release-artifacts/${{ env.BINARY }}/**/* - - name: Check sha256 ${{ env.BINARY }} if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'polkadot' }} - working-directory: release-artifacts/${{ env.BINARY }} + working-directory: release-artifacts run: | . ../../.github/scripts/common/lib.sh @@ -160,7 +145,7 @@ jobs: - name: Check GPG ${{ env.BINARY }} if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'polkadot' }} - working-directory: release-artifacts/${{ env.BINARY }} + working-directory: release-artifacts run: | . ../../.github/scripts/common/lib.sh import_gpg_keys @@ -184,7 +169,7 @@ jobs: echo "No tag, doing without" - name: Fetch release tags - working-directory: release-artifacts/${{ env.BINARY }} + working-directory: release-artifacts if: ${{ env.IMAGE_TYPE == 'release'}} id: fetch_release_refs run: | From 6b91dba2ccc9629fe4c7109c5ccf800e58d93b8a Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 31 May 2024 12:19:23 +0200 Subject: [PATCH 14/14] fix path to the lib.sh --- .github/workflows/release-50_publish-docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index 2fa5c82ead72..4679f58578f7 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -138,7 +138,7 @@ jobs: if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'polkadot' }} working-directory: release-artifacts run: | - . ../../.github/scripts/common/lib.sh + . ../.github/scripts/common/lib.sh echo "Checking binary $BINARY" check_sha256 $BINARY && echo "OK" || echo "ERR" @@ -147,7 +147,7 @@ jobs: if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'polkadot' }} working-directory: release-artifacts run: | - . ../../.github/scripts/common/lib.sh + . ../.github/scripts/common/lib.sh import_gpg_keys check_gpg $BINARY