-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (60 loc) · 1.95 KB
/
manage-pr.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
name: Manage PR
on:
pull_request:
branches:
- main
- release
pull_request_review:
types:
- submitted
- edited
jobs:
lint-and-test:
name: Lint Files and Run Tests
uses: dot-base/.github/.github/workflows/lint-and-test.yml@main
get-pr:
name: Get PR
needs: lint-and-test
uses: dot-base/.github/.github/workflows/get-pr.yml@main
secrets:
GH_BOT_USER: ${{ secrets.GH_BOT_USER }}
GH_BOT_PAT: ${{ secrets.GH_BOT_PAT }}
lint-pr-title:
name: Lint PR Title
needs: get-pr
uses: dot-base/.github/.github/workflows/lint-pr-title.yml@main
with:
pr: ${{ needs.get-pr.outputs.pr }}
secrets:
GH_BOT_USER: ${{ secrets.GH_BOT_USER }}
GH_BOT_PAT: ${{ secrets.GH_BOT_PAT }}
# Run the following steps if the pull request is a release PR
merge-release-pr:
name: Merge Release PR
needs: [get-pr, lint-pr-title]
if: ${{ fromJson(needs.get-pr.outputs.pr).type == 'release' && fromJson(needs.get-pr.outputs.pr).isMergeable == true }}
uses: dot-base/.github/.github/workflows/merge-release-pr.yml@main
with:
pr: ${{ needs.get-pr.outputs.pr }}
secrets:
GH_BOT_USER: ${{ secrets.GH_BOT_USER }}
GH_BOT_PAT: ${{ secrets.GH_BOT_PAT }}
create-release:
name: Create Release
needs: merge-release-pr
uses: dot-base/.github/.github/workflows/create-release.yml@main
secrets:
GH_BOT_USER: ${{ secrets.GH_BOT_USER }}
GH_BOT_PAT: ${{ secrets.GH_BOT_PAT }}
CR_PAT: ${{ secrets.CR_PAT }}
# Run the following steps if the pull request is a feature PR
configure-feature-pr:
name: Configure Feature PR
needs: [get-pr, lint-pr-title]
if: ${{ fromJson(needs.get-pr.outputs.pr).type == 'feature' }}
uses: dot-base/.github/.github/workflows/configure-feature-pr.yml@main
with:
pr: ${{ needs.get-pr.outputs.pr }}
secrets:
GH_BOT_USER: ${{ secrets.GH_BOT_USER }}
GH_BOT_PAT: ${{ secrets.GH_BOT_PAT }}