Skip to content

Commit

Permalink
Update benchmarks.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Sameer Srivastava <[email protected]>
  • Loading branch information
itsmesamster authored Aug 7, 2024
1 parent 393d45b commit 121c297
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,25 @@ jobs:
ruby --version
pwd
gem install dotenv json octokit tmpdir fileutils
# - name: Get PR details
# if: github.event_name == 'workflow_dispatch'
# id: pr_details
# uses: actions/github-script@v6
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# script: |
# const pr_id = parseInt(${{ github.event.inputs.pr_id }});
# echo "pr_id is ${{ github.event.inputs.pr_id }}"
# await (async () => {
# const { data: pr } = await github.rest.pulls.get({
# owner: 'esrlabs',
# repo: 'chipmunk',
# pull_number: pr_id,
# });
# })();
# core.setOutput('owner', pr.head.repo.owner.login);
# core.setOutput('repo', pr.head.repo.name);
- name: Get PR details
if: github.event_name == 'workflow_dispatch'
id: pr_details
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
script: |
const pr_id = parseInt(${{ github.event.inputs.pr_id }});
echo "pr_id is ${{ github.event.inputs.pr_id }}"
await (async () => {
const { data: pr } = await github.rest.pulls.get({
owner: 'esrlabs',
repo: 'chipmunk',
pull_number: pr_id,
});
})();
core.setOutput('owner', pr.head.repo.owner.login);
core.setOutput('repo', pr.head.repo.name);
- name: Get PR details
if: github.event_name == 'workflow_dispatch'
id: pr_details_1
Expand All @@ -98,7 +98,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
script: |
github.pulls.get({
github.rest.pulls.get({
owner: 'esrlabs',
repo: 'chipmunk',
pull_number: pr_id
Expand Down Expand Up @@ -166,4 +166,4 @@ jobs:
git remote set-url origin "https://esrlabs:${{secrets.DOCS_PUSH_TOKEN}}@github.com/esrlabs/chipmunk-docs"
git add ./jekyll/benchmarks/data/pull_request/Benchmark_PR_${{ github.event.inputs.pr_id }}.json
git commit -m "Adding PR benchmark results for chipmunk PR # ${{ github.event.inputs.pr_id }}"
git push origin master
git push origin master

0 comments on commit 121c297

Please sign in to comment.