-
Notifications
You must be signed in to change notification settings - Fork 39
34 lines (31 loc) · 1.37 KB
/
k8s-publish-test-base-image.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: (k8s package) Publish Test Base Image
on:
push:
tags:
# we only need base image for k8s based tests
- 'lib/v*'
workflow_dispatch:
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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Strip "lib/" from github.ref_name
run: |
stripped_ref_name="${GITHUB_REF//refs\/tags\/lib\//}"
# disabling as the string containing variable is double-quotted as a whole, no need to quote each variable separately
# shellcheck disable=SC2086
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@d2f9642bcc24a73400568756f24b72c188ac7a9a # v2.3.31
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 }}