-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (47 loc) · 2.08 KB
/
upstream pretest.yaml
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
name: Upstream pretest
on:
push:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
enmr-PRs:
runs-on: windows-latest
steps:
- name: git config
run: |
git config --global core.autocrlf false
git config --global --add url.https://github.com/.insteadOf "[email protected]:"
- name: checkout
uses: actions/checkout@main
sparse-checkout-cone-mode: false
sparse-checkout: |
.gitmodules
- name: make exec list
run: |
foreach ($subm_key in git config --file .gitmodules --name-only --get-regexp '^submodule\..+\.url$') {
$subm_url = git config --file .gitmodules --get $subm_key
Write-Host "URL: $subm_url"
foreach ($ref_l in git ls-remote $remote_url 'refs/pull/*/merge') {
if ($ref_l -notmatch '^[0-9a-f]+\s+refs/pull/(\d+)/merge$') {
throw "Unexpected format: $ref_l"
}
$pr_num = $Matches[1]
Write-Host "- Found PR $pr_num"
}
}
pretest-each:
runs-on: windows-latest
steps:
- name: git config
run: |
git config --global core.autocrlf false
git config --global user.name "sun pack bot"
git config --global user.email "[email protected]"
- name: checkout
uses: actions/checkout@main
with:
submodules: 'true'
token: ${{ secrets.PAT_TOKEN }}