generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 35
53 lines (48 loc) · 1.45 KB
/
auto-merge.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
name: 🤖 PR auto merge
on:
pull_request:
env:
PR_JOBS_NAME: '[ "Packages", "Demo", "Firebase", "Lint result", "tests", "E2E result" ]'
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- id: jobs
run: |
if [[ "${{ env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR }}" == "true" ]]; then
echo "value=$PR_JOBS_NAME" >> $GITHUB_OUTPUT
else
echo "value=[]" >> $GITHUB_OUTPUT
fi
outputs:
jobs: ${{ steps.jobs.outputs.value }}
wait:
needs: [setup]
runs-on: ubuntu-latest
strategy:
fail-fast: true
jobs:
value: ${{ fromJSON(needs.setup.outputs.jobs) }}
steps:
- uses: taiga-family/ci/actions/run/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
job: ${{ jobs.value }}
approve:
needs: [wait]
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/auto/approve/[email protected]
with:
token1: ${{ secrets.GITHUB_TOKEN }}
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}
- uses: taiga-family/ci/actions/run/[email protected]
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
concurrency:
group: auto-merge-${{ github.head_ref }}
cancel-in-progress: true