File tree Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change 5
5
pull_request_target
6
6
7
7
jobs :
8
- build :
8
+ check-compatibility :
9
9
if : github.repository == 'opensearch-project/OpenSearch'
10
+ permissions :
11
+ contents : read
10
12
runs-on : ubuntu-latest
11
13
steps :
12
14
- uses : actions/checkout@v3
15
+ with :
16
+ ref : ${{ github.event.pull_request.head.sha }}
13
17
14
18
- name : Run compatibility task
15
19
run : ./gradlew checkCompatibility -i | tee $HOME/gradlew-check.out
@@ -22,17 +26,25 @@ jobs:
22
26
echo "### Skipped components" >> "${{ github.workspace }}/results.txt" && grep -e 'Skipped component' $HOME/gradlew-check.out | sed -e 's/Skipped component: \[\(.*\)\]/- \1/' >> "${{ github.workspace }}/results.txt"
23
27
echo "### Compatible components" >> "${{ github.workspace }}/results.txt" && grep -e 'Compatible component' $HOME/gradlew-check.out | sed -e 's/Compatible component: \[\(.*\)\]/- \1/' >> "${{ github.workspace }}/results.txt"
24
28
25
- - name : GitHub App token
26
- id : github_app_token
27
- uses : tibdex/github-app-token@v1.6.0
29
+ - name : Upload results
30
+ uses : actions/upload-artifact@v3
31
+ with :
32
+ name : results.txt
33
+ path : ${{ github.workspace }}/results.txt
34
+
35
+ add-comment :
36
+ needs : [check-compatibility]
37
+ permissions :
38
+ pull-requests : write
39
+ runs-on : ubuntu-latest
40
+ steps :
41
+ - name : Download results
42
+ uses : actions/download-artifact@v3
28
43
with :
29
- app_id : ${{ secrets.APP_ID }}
30
- private_key : ${{ secrets.APP_PRIVATE_KEY }}
31
- installation_id : 22958780
44
+ name : results.txt
32
45
33
46
- name : Add comment on the PR
34
47
uses : peter-evans/create-or-update-comment@v3
35
48
with :
36
- token : ${{ steps.github_app_token.outputs.token }}
37
49
issue-number : ${{ github.event.number }}
38
- body-path : " ${{ github.workspace }}/ results.txt"
50
+ body-path : results.txt
You can’t perform that action at this time.
0 commit comments