Skip to content

replace tag slash

replace tag slash #130

name: (k8s package) Publish Test Base Image
on:
push:
tags:
# we only need base image for k8s based tests
- 'lib/v*'
jobs:
publish_test_base_image:
runs-on: ubuntu-latest
environment: integration
permissions:
id-token: write
contents: read
env:
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: |
tag="${GITHUB_REF##*/}"
echo "tag: ${tag}"
tag_prefix="${GITHUB_REF%%/*}"
echo "tag_prefix: ${tag_prefix}"
echo "BASE_IMAGE_TAG=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image:$tag_prefix-$tag" >> $GITHUB_ENV
echo "Base image tag: ${BASE_IMAGE_TAG}"
- name: Build Base Image
uses: smartcontractkit/chainlink-github-actions/docker/build-push@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
with:
tags: ${{ env.BASE_IMAGE_TAG }}
file: lib/k8s/Dockerfile.base
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}