aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-01-22 15:36:57 +0100
committerCrozet Sébastien <developer@crozet.re>2021-01-22 15:36:57 +0100
commit0f5159d74b46c06bd89661e14101795a69699d1f (patch)
tree100a15b206ffda935695c281f269e96879ea727a /.github
parent4e5bc92f8d946972e513f34cdd3dfcb6cefe0a7c (diff)
downloadrapier-0f5159d74b46c06bd89661e14101795a69699d1f.tar.gz
rapier-0f5159d74b46c06bd89661e14101795a69699d1f.tar.bz2
rapier-0f5159d74b46c06bd89661e14101795a69699d1f.zip
Fix CI bench message emission for fork PRs.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/rapier-ci-bench.yml12
1 files changed, 7 insertions, 5 deletions
diff --git a/.github/workflows/rapier-ci-bench.yml b/.github/workflows/rapier-ci-bench.yml
index aa6e6ca..ee4afa6 100644
--- a/.github/workflows/rapier-ci-bench.yml
+++ b/.github/workflows/rapier-ci-bench.yml
@@ -14,21 +14,23 @@ jobs:
BENCHBOT_AMQP_PASS: ${{ secrets.BENCHBOT_AMQP_PASS }}
BENCHBOT_AMQP_VHOST: ${{ secrets.BENCHBOT_AMQP_VHOST }}
BENCHBOT_AMQP_HOST: ${{ secrets.BENCHBOT_AMQP_HOST }}
- BENCHBOT_TARGET_REPO: ${{ github.repository }}
+ BENCHBOT_TARGET_REPO: ${{ github.event.pull_request.head.repo.clone_url }}
BENCHBOT_TARGET_COMMIT: ${{ github.event.pull_request.head.sha }}
BENCHBOT_SHA: ${{ github.sha }}
- BENCHBOT_HEAD_REF: ${{github.head_ref}}
+ BENCHBOT_HEAD_REF: ${{ github.head_ref }}
BENCHBOT_OTHER_BACKENDS: false
runs-on: ubuntu-latest
steps:
- - name: Find commit SHA
- if: github.ref == 'refs/heads/master'
+ - name: Set env on master
+ if: github.head_ref == ''
run: |
echo "BENCHBOT_TARGET_COMMIT=$BENCHBOT_SHA" >> $GITHUB_ENV
+ echo "BENCHBOT_TARGET_REPO=https://github.com/dimforge/rapier" >> $GITHUB_ENV
+ echo "BENCHBOT_HEAD_REF=master" >> $GITHUB_ENV
echo "BENCHBOT_OTHER_BACKENDS=true" >> $GITHUB_ENV
- name: Send 3D bench message
shell: bash
run: curl -u $BENCHBOT_AMQP_USER:$BENCHBOT_AMQP_PASS
-i -H "content-type:application/json" -X POST
https://$BENCHBOT_AMQP_HOST/api/exchanges/$BENCHBOT_AMQP_VHOST//publish
- -d'{"properties":{},"routing_key":"benchmark","payload":"{ \"repository\":\"https://github.com/'$BENCHBOT_TARGET_REPO'\", \"branch\":\"'$GITHUB_REF'\", \"commit\":\"'$BENCHBOT_TARGET_COMMIT'\", \"other_backends\":'$BENCHBOT_OTHER_BACKENDS' }","payload_encoding":"string"}' \ No newline at end of file
+ -d'{"properties":{},"routing_key":"benchmark","payload":"{ \"repository\":\"'$BENCHBOT_TARGET_REPO'\", \"branch\":\"'$BENCHBOT_HEAD_REF'\", \"commit\":\"'$BENCHBOT_TARGET_COMMIT'\", \"other_backends\":'$BENCHBOT_OTHER_BACKENDS' }","payload_encoding":"string"}' \ No newline at end of file