-
Notifications
You must be signed in to change notification settings - Fork 57
64 lines (51 loc) · 1.55 KB
/
pr_info_untrusted.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: PR Info
# This workflow builds the whole project once and:
# - comments build deprecations/warnings (highlighting new ones since last tested PR)
on:
pull_request:
branches:
- master
jobs:
pr_info:
name: PR Info
runs-on: ubuntu-latest
steps:
# Compiler to test with
- name: Prepare compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-latest
- name: Prepare compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout old stuff, with new comment script
run: |
git checkout ${{ github.base_ref }}
git checkout ${{ github.sha }} -- ./ci/summary_comment.sh ./ci/summary_comment_diff.sh
# first dump old info
- name: Check pre-PR status
run: ./ci/summary_comment.sh | tee ../OLD_OUTPUT.txt
- name: Checkout PR target
run: |
git checkout ${{ github.sha }}
git clean -fd
git reset --hard
- name: Evaluate PR
run: ./ci/summary_comment.sh | tee ../NEW_OUTPUT.txt
- name: Generate comment
run: ./ci/summary_comment_diff.sh ../OLD_OUTPUT.txt ../NEW_OUTPUT.txt | tee comment.txt
- name: Prepare comment for upload
run: |
mkdir -p ./pr
mv comment.txt pr
echo ${{ github.event.number }} > ./pr/NR
- name: upload comment to high-trust action making the comment
uses: actions/upload-artifact@v2
with:
name: pr
path: pr/