Skip to content

Commit

Permalink
use github-script
Browse files Browse the repository at this point in the history
  • Loading branch information
makramkd committed Nov 7, 2024
1 parent 77535e9 commit 59b9d36
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ccip-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,26 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Fetch latest pull request data
id: fetch_pr_data
uses: actions/github-script@v6

Check warning on line 31 in .github/workflows/ccip-integration-test.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Action is using node16 (node-version / warning)
with:
script: |
const pr = await github.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
return pr.data.body;
- name: Get the chainlink commit sha from PR description, if applicable
id: get_chainlink_sha
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
comment="${{ github.event.pull_request.body }}"
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"
else
# Use develop branch by default if not specified or not running in PR.
echo "::set-output name=ref::develop"
fi
- name: Clone Chainlink repo
Expand Down

0 comments on commit 59b9d36

Please sign in to comment.