File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 3030 - name : Enable CPU boost
3131 run : echo "1" | sudo tee /sys/devices/system/cpu/cpufreq/boost
3232
33+ - name : Check membership
34+ if : ${{ env.PR_NUMBER }}
35+ run : |
36+ if [[ $(gh api /orgs/{owner}/members --jq 'any(.login == env.GITHUB_ACTOR)') != true ]]; then
37+ gh pr comment $PR_NUMBER -b "Sorry, you don't have permission to run benchmarks."
38+ exit 1
39+ fi
40+
3341 - name : Post initial comment
3442 run : |
3543 if [[ $PR_NUMBER ]]; then
@@ -149,7 +157,7 @@ jobs:
149157 gh api "$COMMENT_UPDATE_URL" -X PATCH -f body="$BODY"
150158
151159 - name : Post failure comment
152- if : ${{ failure() }}
160+ if : ${{ failure() && env.COMMENT_UPDATE_URL }}
153161 run : |
154162 BODY="Benchmarking failed. Please check [the workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details."
155163 gh api "$COMMENT_UPDATE_URL" -X PATCH -f body="$BODY"
You can’t perform that action at this time.
0 commit comments