Skip to content

Commit 8c2d398

Browse files
committed
allow to pass custom base image tag to build
1 parent d9bf869 commit 8c2d398

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/k8s-publish-test-base-image.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
# we only need base image for k8s based tests
66
- 'lib/v*'
77
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Tag for the base image'
11+
required: true
12+
type: string
813

914
jobs:
1015
publish_test_base_image:
@@ -19,12 +24,19 @@ jobs:
1924
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2025

2126
- name: Strip "lib/" from github.ref_name
27+
if: ${{ github.event_name == 'push' }}
2228
run: |
2329
stripped_ref_name="${GITHUB_REF//refs\/tags\/lib\//}"
2430
# disabling as the string containing variable is double-quotted as a whole, no need to quote each variable separately
2531
# shellcheck disable=SC2086
2632
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
2733
34+
- name: Export base image tag for workflow dispatch
35+
if: ${{ github.event_name == 'workflow_dispatch' }}
36+
shell: bash
37+
run: |
38+
echo "BASE_IMAGE_TAG=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image:${{ github.event.inputs.tag }}" >> $GITHUB_ENV
39+
2840
- name: Build Base Image
2941
uses: smartcontractkit/chainlink-github-actions/docker/build-push@d2f9642bcc24a73400568756f24b72c188ac7a9a # v2.3.31
3042
with:

0 commit comments

Comments
 (0)