Skip to content

Commit

Permalink
Fix core ref workflow integration tests override (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkouv authored Nov 26, 2024
1 parent c63f5f5 commit 3c15717
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/ccip-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,20 @@ jobs:
- name: Get the chainlink commit sha from PR description, if applicable
id: get_chainlink_sha
run: |
default="develop"
if [ "${{ github.event_name }}" == "pull_request" ]; then
comment=$(echo "${{ steps.fetch_pr_data.outputs.result }}" | tr -d '"')
comment='${{ steps.fetch_pr_data.outputs.result }}'
echo $comment
core_ref="$(echo "$comment" | grep -oP 'core ref: \K\S+' || true)"
echo "::set-output name=ref::$core_ref"
core_ref=$(echo "$comment" | grep -oE 'core ref: [a-f0-9]{40}' | cut -d' ' -f3 || true)
if [ -n "$core_ref" ]; then
echo "Overriding chainlink repository commit hash with: $core_ref"
echo "::set-output name=ref::$core_ref"
else
echo "Using default chainlink repository branch: $default"
echo "::set-output name=ref::$default"
fi
else
echo "::set-output name=ref::develop"
echo "::set-output name=ref::$default"
fi
- name: Clone Chainlink repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Follow the steps below to ensure that we don't run into any unexpected breakages
the `main` branch of chainlink-ccip. You can do this by:
- Creating a branch in the CCIP repo and running `go get github.com/smartcontractkit/chainlink-ccip@<your-branch-commit-sha>`.
- Fixing the build/tests.
- You can specify a particular commit hash on the chainlink repo by adding "core ref: commit sha" to your PR description. See [this](https://github.com/smartcontractkit/chainlink-ccip/pull/307) as an example. If you update the description, manually rerun the workflow.
- You can specify a particular commit hash on the chainlink repo by adding "core ref: commit sha" to your PR description. See [this](https://github.com/smartcontractkit/chainlink-ccip/pull/307) as an example. If you update the description, manually rerun the workflow. **NOTE**: Your PR description should not contain single quote (').
4. Once your chainlink-ccip PR is approved, merge it.
5. Go back to your chainlink PR and bump the chainlink-ccip version to the latest main.
6. Once the integration test passes, merge your chainlink PR into `develop`.

0 comments on commit 3c15717

Please sign in to comment.