From 57e26523b85c5f0ef1b9932b66024cce769b62f7 Mon Sep 17 00:00:00 2001 From: cfal Date: Mon, 21 Aug 2023 16:41:28 +0800 Subject: [PATCH] .github/workflows/integration-tests-docker.yml: allow specifying core ref --- .../workflows/integration-tests-docker.yml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests-docker.yml b/.github/workflows/integration-tests-docker.yml index f1f420731..5809187d0 100644 --- a/.github/workflows/integration-tests-docker.yml +++ b/.github/workflows/integration-tests-docker.yml @@ -15,13 +15,29 @@ jobs: integration_tests_docker: name: Run docker tests runs-on: ubuntu-latest + env: + # TEMP: cosmos-test-keys branch with fixes + # TODO: replace with origin/develop when ready + DEFAULT_CORE_REF: 9c95732370e5c39a5dccf21e6db9fe167abe8d09 + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: + - name: Ensure jq is installed + run: sudo apt-get install -y jq || echo "jq is already installed" + - name: Get commit hash from PR's original comment + if: github.event_name == 'pull_request' + id: get-comment-ref + run: | + comment=$(gh pr view https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} --json comments -q '.comments[0].body') + core_ref=$(echo $comment | grep -oP 'core ref: \K\S+') + if [ ! -z "$core_ref" ]; then + echo "CUSTOM_CORE_REF=${core_ref}" >> "${GITHUB_ENV}" + fi + - name: Checkout chainlink repo uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: repository: smartcontractkit/chainlink - # TEMP: cosmos-test-keys branch with fixes - ref: 9c95732370e5c39a5dccf21e6db9fe167abe8d09 + ref: ${{ env.CUSTOM_CORE_REF || env.DEFAULT_CORE_REF }} path: temp/chainlink - name: Update chainlink-cosmos sha