diff --git a/.github/workflows/k8s-publish-test-base-image.yaml b/.github/workflows/k8s-publish-test-base-image.yaml index 72225d863..096156172 100644 --- a/.github/workflows/k8s-publish-test-base-image.yaml +++ b/.github/workflows/k8s-publish-test-base-image.yaml @@ -16,6 +16,17 @@ jobs: BASE_IMAGE_TAG: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image:${{ github.ref_name }} steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + + - name: Strip slashes after colon in tag using Python + id: strip_tag + run: | + ref_name="${GITHUB_REF##*/}" + echo "ref_name: ${ref_name}" + # Use Python to replace slashes after the first colon + modified_tag=$(python3 -c 'import sys; ref_name = sys.argv[1]; modified = ref_name.split(":")[0] + ":" + ref_name.split(":")[1].replace("/", "-"); print(modified)' "$ref_name") + echo "modified tag: ${ref_name}" + echo "BASE_IMAGE_TAG=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image:$modified_tag" >> $GITHUB_ENV + - name: Build Base Image uses: smartcontractkit/chainlink-github-actions/docker/build-push@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16 with: