forked from OpenMS/OpenMS
-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (36 loc) · 1.12 KB
/
Copy pathcheck-tool-handler.yml
File metadata and controls
37 lines (36 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Check ToolHandler.cpp
on:
pull_request_target:
types: [ "opened" ]
branches: [ "develop" ]
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Clone PR Repository
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Clone OpenMS CI Tools Repository
uses: actions/checkout@v6
with:
repository: OpenMS/ci-tools
path: ci-tools
- name: Check the ToolHandler.cpp file
run: |
exit_code=0
ci-tools/scripts/check-tool-handler.sh "$GITHUB_BASE_REF" "HEAD" || exit_code=$?
if [ "$exit_code" -eq 100 ]; then
ci-tools/scripts/check-tool-handler.sh -p "$ACTOR" "$GITHUB_BASE_REF" "HEAD" |
gh pr comment "$PR" --body-file -
elif [ "$exit_code" -ne 0 ]; then
exit "$exit_code"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.pull_request.html_url }}
ACTOR: ${{ github.actor }}