diff --git a/.github/workflows/e2e_custom_cl.yml b/.github/workflows/e2e_custom_cl.yml index 9b545c7c6..48429e11c 100644 --- a/.github/workflows/e2e_custom_cl.yml +++ b/.github/workflows/e2e_custom_cl.yml @@ -7,10 +7,11 @@ on: description: Chainlink repo branch to integrate with required: true default: develop - type: string + type: [opened, synchronize, reopened, edited] env: CL_ECR: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink + CUSTOM_CORE_REF: develop CONTRACT_ARTIFACTS_PATH: contracts/target/deploy MOD_CACHE_VERSION: 1 @@ -60,12 +61,20 @@ jobs: id-token: write contents: read steps: + - name: Get core ref from PR body + if: github.event_name == 'pull_request' + run: | + comment=$(gh pr view "https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" --json body -q '.body') + core_ref=$(echo "$comment" | grep -oP 'core ref: \K\S+' || true) + if [ ! -n "$core_ref" ]; then + echo "CUSTOM_CORE_REF=${core_ref}" >> "${GITHUB_ENV}" + fi - name: Check if image exists id: check-image uses: smartcontractkit/chainlink-github-actions/docker/image-exists@ad22fbd6f4d108b82aaf49b527bcf40f32babea8 # v2.2.1 with: repository: chainlink - tag: solana.${{ github.event.inputs.cl_branch_ref || github.sha }} + tag: solana.${{ env.CUSTOM_CORE_REF || github.event.inputs.cl_branch_ref || github.sha }} AWS_REGION: ${{ secrets.QA_AWS_REGION }} AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - name: Build Image @@ -73,9 +82,9 @@ jobs: uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@d5ab9fe53da374dd789b5d9ef10f3282197e088d # we will want to switch to this once cosmos settles back down 336617ae6d70fec60c15cc3382e17a4d2615a801 # v2.2.0 with: cl_repo: smartcontractkit/chainlink - cl_ref: ${{ github.event.inputs.cl_branch_ref }} + cl_ref: ${{ env.CUSTOM_CORE_REF || github.event.inputs.cl_branch_ref }} dep_solana_sha: ${{ github.event.pull_request.head.sha }} - push_tag: ${{ env.CL_ECR }}:solana.${{ github.event.inputs.cl_branch_ref || github.sha }} + push_tag: ${{ env.CL_ECR }}:solana.${{ env.CUSTOM_CORE_REF || github.event.inputs.cl_branch_ref || github.sha }} QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} @@ -122,7 +131,7 @@ jobs: test_download_vendor_packages_command: cd ./integration-tests && go mod download go_mod_path: ./integration-tests/go.mod cl_repo: ${{ env.CL_ECR }} - cl_image_tag: solana.${{ github.event.inputs.cl_branch_ref || github.sha }} + cl_image_tag: solana.${{ env.CUSTOM_CORE_REF || github.event.inputs.cl_branch_ref || github.sha }} token: ${{ secrets.GITHUB_TOKEN }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} artifacts_name: smoke-test-logs