Skip to content

Commit b446ff5

Browse files
committed
move automerge into its own file
1 parent 111dfbb commit b446ff5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/automerge.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v2.1.2
16+
with:
17+
node-version: 10.x
18+
19+
- name: Check RP in Autogenlist
20+
if: ${{ github.actor == 'AzureSDKAutomation' && startsWith(github.head_ref, 'sdkAutomation') }}
21+
run: |
22+
check_result='';
23+
exec=$(npm run find-basepath ${{ github.head_ref }});
24+
while read line;
25+
do
26+
# overriding check_result until the last line is read, last line contains
27+
# the result to whether or not the basepath was found in autogenlist.
28+
check_result=$line;
29+
echo $check_result;
30+
done <<< "$exec";
31+
32+
echo "AUTOGENLIST_CHECK_RESULT=$check_result" >> $GITHUB_ENV;
33+
working-directory: ./generator
34+
35+
- name: Automerge
36+
if: ${{ github.actor == 'AzureSDKAutomation' && startsWith(github.head_ref, 'sdkAutomation') && env.AUTOGENLIST_CHECK_RESULT == 'true' }}
37+
uses: "pascalgn/automerge-action@v0.12.0"
38+
env:
39+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
40+
MERGE_LABELS: ""

0 commit comments

Comments
 (0)