Skip to content

Commit

Permalink
replace tag slash
Browse files Browse the repository at this point in the history
  • Loading branch information
skudasov committed Sep 5, 2024
1 parent 7b3c0db commit 69941d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/k8s-publish-test-base-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 69941d8

Please sign in to comment.