-
-
Notifications
You must be signed in to change notification settings - Fork 227
68 lines (54 loc) · 1.79 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
65
66
67
68
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
- stable
jobs:
pr_info:
name: PR Info
runs-on: ubuntu-latest
steps:
# we first create a comment thanking the user in pr_info_intro.yml
# (separate step due to needing GITHUB_TOKEN access)
- name: '[Linux] Install dependencies'
if: runner.os == 'Linux'
run: |
sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev netcat
# Compiler to test with
- name: Prepare compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout old stuff, with new comment script
run: |
git checkout ${{ github.base_ref }}
git checkout ${{ github.sha }} -- ./scripts/ci/summary_comment.sh ./scripts/ci/summary_comment_diff.sh
# first dump old info
- name: Check pre-PR status
run: ./scripts/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: ./scripts/ci/summary_comment.sh | tee ../NEW_OUTPUT.txt
- name: Generate comment
run: ./scripts/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@v4
with:
name: pr
path: pr/