-
Notifications
You must be signed in to change notification settings - Fork 39
/
action.yml
67 lines (65 loc) · 2.97 KB
/
action.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build Test Image
description: A composite action that allows building and publishing the test remote runner image
inputs:
tag:
description: The tag to use by default and to use for checking image existance
default: ${{ github.sha }}
required: false
other_tags:
description: Other tags to push if needed
required: false
artifacts_path:
description: The path for downloading the built artifacts
required: false
default: contracts/target/deploy
QA_AWS_ROLE_TO_ASSUME:
description: The AWS role to assume as the CD user, if any. Used in configuring the docker/login-action
required: true
QA_AWS_REGION:
description: The AWS region the ECR repository is located in, should only be needed for public ECR repositories, used in configuring docker/login-action
required: true
QA_AWS_ACCOUNT_NUMBER:
description: The AWS region the ECR repository is located in, should only be needed for public ECR repositories, used in configuring docker/login-action
required: true
runs:
using: composite
steps:
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
repository: chainlink-solana-tests
tag: ${{ inputs.tag }}
AWS_REGION: ${{ inputs.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
- name: Download Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: artifacts
path: ${{ inputs.artifacts_path }}
- name: Get CTF Version
id: version
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
go-project-path: ./integration-tests
module-name: github.com/smartcontractkit/chainlink-testing-framework
enforce-semantic-tag: false
- name: Build and Publish Test Runner
if: steps.check-image.outputs.exists == 'false'
uses: smartcontractkit/chainlink-github-actions/docker/build-push@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
tags: |
${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ inputs.tag }}
${{ inputs.other_tags }}
file: ./integration-tests/test.Dockerfile
build-args: |
BASE_IMAGE=${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image
IMAGE_VERSION=${{ steps.version.outputs.version }}
SUITES="smoke"
AWS_REGION: ${{ inputs.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
- name: Print Image Built
shell: sh
run: |
echo "### chainlink-solana-tests image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY
echo "\`${{ inputs.tag }}\`" >>$GITHUB_STEP_SUMMARY