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 69941d8 commit 89ffcfd
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/k8s-publish-test-base-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ jobs:
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Strip slashes after colon in tag using Python
id: strip_tag
- name: Strip "lib/" from github.ref_name
run: |

Check failure on line 21 in .github/workflows/k8s-publish-test-base-image.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/k8s-publish-test-base-image.yaml#L21

shellcheck reported issue in this script: SC2086:info:2:149: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/k8s-publish-test-base-image.yaml:21:9: shellcheck reported issue in this script: SC2086:info:2:149: Double quote to prevent globbing and word splitting [shellcheck]
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
stripped_ref_name=${GITHUB_REF//refs\/tags\/lib\//}
echo "BASE_IMAGE_TAG=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image:$stripped_ref_name" >> $GITHUB_ENV
- name: Build Base Image
uses: smartcontractkit/chainlink-github-actions/docker/build-push@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
Expand Down

0 comments on commit 89ffcfd

Please sign in to comment.