From 9334c93f4ffced19e0f4c154593e972b19217bb6 Mon Sep 17 00:00:00 2001 From: lystopad Date: Tue, 19 Nov 2024 18:19:40 +0100 Subject: [PATCH 1/5] Rework ci-cd-main-branch-docker-images.yml Initial work to make this workflow working with many branches, not only with 'main'. --- .../ci-cd-main-branch-docker-images.yml | 71 +++++++++++++------ 1 file changed, 50 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-cd-main-branch-docker-images.yml b/.github/workflows/ci-cd-main-branch-docker-images.yml index 0892ddb8ff2..9cfba8e7d4b 100644 --- a/.github/workflows/ci-cd-main-branch-docker-images.yml +++ b/.github/workflows/ci-cd-main-branch-docker-images.yml @@ -9,51 +9,79 @@ env: CHECKOUT_REF: "main" DOCKERHUB_REPOSITORY: "erigontech/erigon" LABEL_DESCRIPTION: "[docker image built on a last commit id from the main branch] Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. Archive Node by default." - KEEP_IMAGES: 100 + ## KEEP_IMAGES: 100 ### see step 'Define variables" + RUNNER: "ubuntu-latest" on: push: branches: - 'main' + - 'docker_pectra' paths-ignore: - '.github/**' workflow_dispatch: + inputs: + checkout_ref: + required: false + type: string + default: '' + description: 'The branch to checkout and build artifacts from in case of manual run. Default is "" .' jobs: - define_matrix: - runs-on: ubuntu-latest - outputs: - os: ${{ steps.os.outputs.os }} - - steps: - - name: Define os - id: os - run: echo 'os=ubuntu-latest' >> "$GITHUB_OUTPUT" - Build: - needs: define_matrix - runs-on: ${{ needs.define_matrix.outputs.os }} + runs-on: ${{ env.RUNNER }} timeout-minutes: 45 outputs: docker_build_tag: ${{ steps.built_tag_export.outputs.docker_build_tag }} steps: - - name: Fast checkout git repository + - name: Fast checkout git repository, git ref ${{ inputs.checkout_ref == '' && github.ref || inputs.checkout_ref }} uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 ## 4.1.7 release with: repository: ${{ env.APP_REPO }} fetch-depth: 1 - ref: ${{ env.CHECKOUT_REF }} + ref: ${{ inputs.checkout_ref == '' && github.ref || inputs.checkout_ref }} path: 'erigon' - name: Setup go env and cache uses: actions/setup-go@v5 with: go-version: '>=1.22' - go-version-file: 'erigon/go.mod' cache-dependency-path: | erigon/go.sum + - name: Define variables + id: def_docker_vars + ## Idea is: + ## latest image: erigontech/erigon:${tag_name}${latest_suffix} + ## commit id image: erigontech/erigon:${tag_name}-${short_commit_id} + run: | + case '${{ inputs.checkout_ref }}' in + 'main' ) + export tag_name='main'; + export keep_images=100; + export latest_suffix='-latest' + export binaries="erigon integration rpcdaemon" + ;; + 'docker_pectra' ) + export tag_name='docker_pectra'; + export keep_images=5; + export latest_suffix=''; + export binaries="erigon" + ;; + * ) + # use last string after last slash '/' by default if branch contains slash: + export tag_name=$(echo ${{ inputs.checkout_ref }} | sed -e 's/.*\///g' ); + export keep_images=0; + export latest_suffix='-latest' + export binaries="erigon" + ;; + esac + echo "tag_name=${tag_name}" >> $GITHUB_OUTPUT + echo "keep_images=${keep_images}" >> $GITHUB_OUTPUT + echo "latest_suffix=${latest_suffix}" >> $GITHUB_OUTPUT + echo "Debug ${tag_name} ${keep_images} ${latest_suffix}" + - name: Get commit id id: getCommitId run: | @@ -96,9 +124,10 @@ jobs: ${{ env.BUILDER_IMAGE }} \ -c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=amd64 GOAMD64=v2 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm,netgo erigon integration rpcdaemon" - - name: Build and push multi-platform docker image based on the commit id ${{ steps.getCommitId.outputs.short_commit_id }} in the main branch + - name: Build and push multi-platform docker image based on the commit id ${{ steps.getCommitId.outputs.short_commit_id }} in the ${{ GITHUB.BASE_REF }} branch env: - BUILD_VERSION: "main-${{ steps.getCommitId.outputs.short_commit_id }}" + BUILD_VERSION: "${{ steps.def_docker_vars.outputs.tag_name }}-${{ steps.getCommitId.outputs.short_commit_id }}" + BUILD_VERSION_LATEST: "${{ steps.def_docker_vars.outputs.tag_name }}-${{ steps.def_docker_vars.outputs.latest_suffix }}" DOCKER_URL: ${{ env.DOCKERHUB_REPOSITORY }} DOCKERFILE_PATH: Dockerfile.release run: | @@ -113,7 +142,7 @@ jobs: --build-arg CI_CD_MAIN_TARGET_BASE_IMAGE=${{ env.TARGET_BASE_IMAGE }} \ --build-arg CI_CD_MAIN_BUILDER_IMAGE=${{ env.BUILDER_IMAGE }} \ --tag ${{ env.DOCKER_URL }}:${{ env.BUILD_VERSION }} \ - --tag ${{ env.DOCKER_URL }}:main-latest \ + --tag ${{ env.DOCKER_URL }}:${{ env.BUILD_VERSION_LATEST }} \ --label org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ --label org.opencontainers.image.authors="https://github.com/erigontech/erigon/graphs/contributors" \ --label org.opencontainers.image.url="https://github.com/erigontech/erigon/blob/main/Dockerfile" \ @@ -169,9 +198,9 @@ jobs: done run-kurtosis-assertoor: - needs: [define_matrix, Build] + needs: [ Build] uses: erigontech/erigon/.github/workflows/test-kurtosis-assertoor.yml@main with: checkout_ref: ${{ github.sha }} - os: ${{ needs.define_matrix.outputs.os }} + os: ${{ env.RUNNER }} docker_build_tag: ${{ needs.Build.outputs.docker_build_tag }} From 3bc2c69cdc0355e7d4de335e8693029e383b0c0e Mon Sep 17 00:00:00 2001 From: Oleksandr Lystopad Date: Wed, 20 Nov 2024 11:41:04 +0100 Subject: [PATCH 2/5] Rework --- .../ci-cd-main-branch-docker-images.yml | 61 +++++++++++-------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci-cd-main-branch-docker-images.yml b/.github/workflows/ci-cd-main-branch-docker-images.yml index 9cfba8e7d4b..fb0321a911a 100644 --- a/.github/workflows/ci-cd-main-branch-docker-images.yml +++ b/.github/workflows/ci-cd-main-branch-docker-images.yml @@ -1,5 +1,5 @@ name: CI-CD build and deploy docker images based on the last commit in the main branch -run-name: "Commit id ${{ github.sha }}: CI-CD build and deploy docker images based on the commit id in the main branch" +run-name: "Commit id ${{ github.sha }}: CI-CD build and deploy docker images based on the commit id in the ${{ github.ref_name }} branch" env: APPLICATION: "erigon" @@ -9,7 +9,6 @@ env: CHECKOUT_REF: "main" DOCKERHUB_REPOSITORY: "erigontech/erigon" LABEL_DESCRIPTION: "[docker image built on a last commit id from the main branch] Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. Archive Node by default." - ## KEEP_IMAGES: 100 ### see step 'Define variables" RUNNER: "ubuntu-latest" on: @@ -25,7 +24,7 @@ on: required: false type: string default: '' - description: 'The branch to checkout and build artifacts from in case of manual run. Default is "" .' + description: 'The branch to checkout and build artifacts from (in case of manual run). Default is "" .' jobs: Build: @@ -46,7 +45,7 @@ jobs: - name: Setup go env and cache uses: actions/setup-go@v5 with: - go-version: '>=1.22' + go-version: '>=1.23' cache-dependency-path: | erigon/go.sum @@ -67,13 +66,13 @@ jobs: export tag_name='docker_pectra'; export keep_images=5; export latest_suffix=''; - export binaries="erigon" + export binaries="erigon caplin diag devnet downloader evm hack integration rpcdaemon rpctest sentinel sentry state txpool" ;; * ) # use last string after last slash '/' by default if branch contains slash: export tag_name=$(echo ${{ inputs.checkout_ref }} | sed -e 's/.*\///g' ); export keep_images=0; - export latest_suffix='-latest' + export latest_suffix='' export binaries="erigon" ;; esac @@ -125,12 +124,15 @@ jobs: -c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=amd64 GOAMD64=v2 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm,netgo erigon integration rpcdaemon" - name: Build and push multi-platform docker image based on the commit id ${{ steps.getCommitId.outputs.short_commit_id }} in the ${{ GITHUB.BASE_REF }} branch + id: built_tag_export env: BUILD_VERSION: "${{ steps.def_docker_vars.outputs.tag_name }}-${{ steps.getCommitId.outputs.short_commit_id }}" - BUILD_VERSION_LATEST: "${{ steps.def_docker_vars.outputs.tag_name }}-${{ steps.def_docker_vars.outputs.latest_suffix }}" + BUILD_VERSION_LATEST: "${{ steps.def_docker_vars.outputs.tag_name }}${{ steps.def_docker_vars.outputs.latest_suffix }}" + DOCKER_PUBLISH_CONDITION: ${{ steps.def_docker_vars.outputs.keep_images > 0 && format('--tag {0}:{1} ',env.DOCKER_URL,env.BUILD_VERSION) || '' }} DOCKER_URL: ${{ env.DOCKERHUB_REPOSITORY }} DOCKERFILE_PATH: Dockerfile.release run: | + echo "docker_build_tag=${{ env.BUILD_VERSION }}" >> $GITHUB_OUTPUT cp -vr build-amd64 erigon/ cp -vr build-arm64 erigon/ cd erigon @@ -141,7 +143,7 @@ jobs: --sbom=true \ --build-arg CI_CD_MAIN_TARGET_BASE_IMAGE=${{ env.TARGET_BASE_IMAGE }} \ --build-arg CI_CD_MAIN_BUILDER_IMAGE=${{ env.BUILDER_IMAGE }} \ - --tag ${{ env.DOCKER_URL }}:${{ env.BUILD_VERSION }} \ + ${{ env.DOCKER_PUBLISH_CONDITION }} \ --tag ${{ env.DOCKER_URL }}:${{ env.BUILD_VERSION_LATEST }} \ --label org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ --label org.opencontainers.image.authors="https://github.com/erigontech/erigon/graphs/contributors" \ @@ -158,16 +160,19 @@ jobs: --platform linux/amd64,linux/arm64 . - name: export and print docker build tag, cleanup old docker images - id: built_tag_export env: - BUILD_VERSION: "main-${{ steps.getCommitId.outputs.short_commit_id }}" + BUILD_VERSION: "${{ steps.def_docker_vars.outputs.tag_name }}-${{ steps.getCommitId.outputs.short_commit_id }}" + BUILD_VERSION_LATEST: "${{ steps.def_docker_vars.outputs.tag_name }}${{ steps.def_docker_vars.outputs.latest_suffix }}" + BUILD_VERSION_CONDITION: ${{ steps.def_docker_vars.outputs.keep_images > 0 && format('{0}:{1} ',env.DOCKER_URL,env.BUILD_VERSION) || '' }} + DOCKER_URL: ${{ env.DOCKERHUB_REPOSITORY }} + TAG_KEY: ${{ steps.def_docker_vars.outputs.tag_name }} + KEEP_IMAGES: ${{ steps.def_docker_vars.outputs.keep_images }} run: | - echo "docker_build_tag=${{ env.BUILD_VERSION }}" >> $GITHUB_OUTPUT echo The following docker images have been published: - echo "${{ env.DOCKERHUB_REPOSITORY }}:main-${{ env.BUILD_VERSION }}" - echo "${{ env.DOCKERHUB_REPOSITORY }}:main-latest" + echo "${{ env.DOCKERHUB_REPOSITORY }}:${{ env.BUILD_VERSION_LATEST }}" + echo "${{ env.BUILD_VERSION_CONDITION }} (empty, if keep_images is 0)" echo - echo "Cleanup old docker images matching pattern tag ~= main-XXXXXXX" + echo "Cleanup old docker images matching pattern tag ~= ${{ env.TAG_KEY }}-XXXXXXX" curl_cmd="curl -s -H \"Authorization: JWT ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}\" " dockerhub_url='https://hub.docker.com/v2/namespaces/erigontech/repositories/erigon' my_list () { @@ -175,29 +180,31 @@ jobs: next_page="$dockerhub_url/tags?page=1&page_size=100" while [ "$next_page" != "null" ] do - # Print tags and push dates for tags matching "main-": - $curl_cmd $next_page | jq -r '.results|.[]|.name + " " + .tag_last_pushed' | grep 'main-' + # Print tags and push dates for tags matching "${{ env.TAG_KEY }}-": + $curl_cmd $next_page | jq -r '.results|.[]|.name + " " + .tag_last_pushed' | grep '${{ env.TAG_KEY }}-' next_page=`$curl_cmd $next_page | jq '.next' | sed -e 's/^\"//' -e 's/\"$//'` done } my_list | tail -n+${{ env.KEEP_IMAGES }} | while read line; do echo -n "Removing docker image/published - $line " - current_image=$(echo $line | sed -e 's/^\(main-.\{7\}\) .*/\1/') - output_code=$(curl --write-out %{http_code} --output curl-output.log \ - -s -X DELETE -H "Accept: application/json" \ - -H "Authorization: JWT ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}" \ - https://hub.docker.com/v2/repositories/erigontech/erigon/tags/${current_image} ) - if [ $output_code -ne 204 ]; then - echo "ERROR: failed to remove docker image erigon:${current_image}" - echo "ERROR: API response: $(cat curl-output.log)." - else - echo -n " - removed. " - fi + current_image=$(echo $line | sed -e 's/^\(${{ env.TAG_KEY }}-.\{7\}\) .*/\1/') + #output_code=$(curl --write-out %{http_code} --output curl-output.log \ + # -s -X DELETE -H "Accept: application/json" \ + # -H "Authorization: JWT ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}" \ + # https://hub.docker.com/v2/repositories/erigontech/erigon/tags/${current_image} ) + #if [ $output_code -ne 204 ]; then + # echo "ERROR: failed to remove docker image erigon:${current_image}" + # echo "ERROR: API response: $(cat curl-output.log)." + #else + # echo -n " - removed. " + #fi echo "Done." done + ## run only for 'main' branch: run-kurtosis-assertoor: + if: github.ref == 'main' needs: [ Build] uses: erigontech/erigon/.github/workflows/test-kurtosis-assertoor.yml@main with: From a4a7856accbef1f000f6f8d206c36beda2573e2d Mon Sep 17 00:00:00 2001 From: Oleksandr Lystopad Date: Wed, 20 Nov 2024 11:48:20 +0100 Subject: [PATCH 3/5] Fix runner configuration --- .github/workflows/ci-cd-main-branch-docker-images.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd-main-branch-docker-images.yml b/.github/workflows/ci-cd-main-branch-docker-images.yml index fb0321a911a..206848dae3a 100644 --- a/.github/workflows/ci-cd-main-branch-docker-images.yml +++ b/.github/workflows/ci-cd-main-branch-docker-images.yml @@ -9,7 +9,6 @@ env: CHECKOUT_REF: "main" DOCKERHUB_REPOSITORY: "erigontech/erigon" LABEL_DESCRIPTION: "[docker image built on a last commit id from the main branch] Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. Archive Node by default." - RUNNER: "ubuntu-latest" on: push: @@ -28,7 +27,7 @@ on: jobs: Build: - runs-on: ${{ env.RUNNER }} + runs-on: ubuntu-latest timeout-minutes: 45 outputs: docker_build_tag: ${{ steps.built_tag_export.outputs.docker_build_tag }} @@ -204,10 +203,10 @@ jobs: ## run only for 'main' branch: run-kurtosis-assertoor: - if: github.ref == 'main' + if: github.ref_name == 'main' needs: [ Build] uses: erigontech/erigon/.github/workflows/test-kurtosis-assertoor.yml@main with: checkout_ref: ${{ github.sha }} - os: ${{ env.RUNNER }} + os: ubuntu-latest docker_build_tag: ${{ needs.Build.outputs.docker_build_tag }} From 768a1a20b8c5a9087879ea9f0c37e0b52ac40153 Mon Sep 17 00:00:00 2001 From: Oleksandr Lystopad Date: Wed, 20 Nov 2024 12:40:05 +0100 Subject: [PATCH 4/5] Add missed variable for binaries, move condition to run section --- .../workflows/ci-cd-main-branch-docker-images.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-cd-main-branch-docker-images.yml b/.github/workflows/ci-cd-main-branch-docker-images.yml index 206848dae3a..b33bbc23b11 100644 --- a/.github/workflows/ci-cd-main-branch-docker-images.yml +++ b/.github/workflows/ci-cd-main-branch-docker-images.yml @@ -78,7 +78,8 @@ jobs: echo "tag_name=${tag_name}" >> $GITHUB_OUTPUT echo "keep_images=${keep_images}" >> $GITHUB_OUTPUT echo "latest_suffix=${latest_suffix}" >> $GITHUB_OUTPUT - echo "Debug ${tag_name} ${keep_images} ${latest_suffix}" + echo "binaries=${binaries}" >> $GITHUB_OUTPUT + echo "Debug ${tag_name} ${keep_images} ${latest_suffix} ${binaries}" - name: Get commit id id: getCommitId @@ -101,6 +102,8 @@ jobs: uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db ## v3.6.1 - name: Build arm64 + env: + BINARIES: ${{ steps.def_docker_vars.outputs.binaries }} run: | docker run --platform linux/arm64 \ --rm -v $(pwd)/erigon:/erigon:ro \ @@ -109,9 +112,11 @@ jobs: -v ${HOME}/go/pkg/mod:/go/pkg/mod \ -w /erigon --entrypoint /bin/sh \ ${{ env.BUILDER_IMAGE }} \ - -c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=arm64 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm,netgo erigon integration rpcdaemon" + -c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=arm64 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm,netgo ${{ env.BINARIES }}" - name: Build amd64 + env: + BINARIES: ${{ steps.def_docker_vars.outputs.binaries }} run: | docker run --platform linux/amd64 \ --rm -v $(pwd)/erigon:/erigon:ro \ @@ -120,14 +125,14 @@ jobs: -v ${HOME}/go/pkg/mod:/go/pkg/mod \ -w /erigon --entrypoint /bin/sh \ ${{ env.BUILDER_IMAGE }} \ - -c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=amd64 GOAMD64=v2 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm,netgo erigon integration rpcdaemon" + -c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=amd64 GOAMD64=v2 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm,netgo ${{ env.BINARIES }}" - name: Build and push multi-platform docker image based on the commit id ${{ steps.getCommitId.outputs.short_commit_id }} in the ${{ GITHUB.BASE_REF }} branch id: built_tag_export env: BUILD_VERSION: "${{ steps.def_docker_vars.outputs.tag_name }}-${{ steps.getCommitId.outputs.short_commit_id }}" BUILD_VERSION_LATEST: "${{ steps.def_docker_vars.outputs.tag_name }}${{ steps.def_docker_vars.outputs.latest_suffix }}" - DOCKER_PUBLISH_CONDITION: ${{ steps.def_docker_vars.outputs.keep_images > 0 && format('--tag {0}:{1} ',env.DOCKER_URL,env.BUILD_VERSION) || '' }} + DOCKER_PUBLISH_CONDITION: ${{ steps.def_docker_vars.outputs.keep_images > 0 && format('--tag {0}:{1} ', env.DOCKER_URL, env.BUILD_VERSION) || '' }} DOCKER_URL: ${{ env.DOCKERHUB_REPOSITORY }} DOCKERFILE_PATH: Dockerfile.release run: | @@ -142,7 +147,7 @@ jobs: --sbom=true \ --build-arg CI_CD_MAIN_TARGET_BASE_IMAGE=${{ env.TARGET_BASE_IMAGE }} \ --build-arg CI_CD_MAIN_BUILDER_IMAGE=${{ env.BUILDER_IMAGE }} \ - ${{ env.DOCKER_PUBLISH_CONDITION }} \ + ${{ steps.def_docker_vars.outputs.keep_images > 0 && format('--tag {0}:{1} ', env.DOCKER_URL, env.BUILD_VERSION) || '' }} \ --tag ${{ env.DOCKER_URL }}:${{ env.BUILD_VERSION_LATEST }} \ --label org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ --label org.opencontainers.image.authors="https://github.com/erigontech/erigon/graphs/contributors" \ From 7cc7657c167dc4bb378dce9e6af58fb283aa593f Mon Sep 17 00:00:00 2001 From: Oleksandr Lystopad Date: Wed, 20 Nov 2024 15:01:49 +0100 Subject: [PATCH 5/5] test output --- .github/workflows/ci-cd-main-branch-docker-images.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd-main-branch-docker-images.yml b/.github/workflows/ci-cd-main-branch-docker-images.yml index b33bbc23b11..5559fb51c3a 100644 --- a/.github/workflows/ci-cd-main-branch-docker-images.yml +++ b/.github/workflows/ci-cd-main-branch-docker-images.yml @@ -174,7 +174,7 @@ jobs: run: | echo The following docker images have been published: echo "${{ env.DOCKERHUB_REPOSITORY }}:${{ env.BUILD_VERSION_LATEST }}" - echo "${{ env.BUILD_VERSION_CONDITION }} (empty, if keep_images is 0)" + echo "${{ steps.def_docker_vars.outputs.keep_images > 0 && format('{0}:{1} ',env.DOCKER_URL,env.BUILD_VERSION) || '' }} (empty, if keep_images is 0)" echo echo "Cleanup old docker images matching pattern tag ~= ${{ env.TAG_KEY }}-XXXXXXX" curl_cmd="curl -s -H \"Authorization: JWT ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}\" " @@ -189,7 +189,9 @@ jobs: next_page=`$curl_cmd $next_page | jq '.next' | sed -e 's/^\"//' -e 's/\"$//'` done } - + echo "DEBUG" + my_list + echo "END DEBUG" my_list | tail -n+${{ env.KEEP_IMAGES }} | while read line; do echo -n "Removing docker image/published - $line " current_image=$(echo $line | sed -e 's/^\(${{ env.TAG_KEY }}-.\{7\}\) .*/\1/') @@ -206,7 +208,7 @@ jobs: echo "Done." done - ## run only for 'main' branch: + ## run only for 'main' branch and workflow executed by push event: run-kurtosis-assertoor: if: github.ref_name == 'main' needs: [ Build]