-
Notifications
You must be signed in to change notification settings - Fork 8
80 lines (72 loc) · 2.02 KB
/
event_pr.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: ⚡ Pull-Request
run-name: 'PR / ${{ github.event.pull_request.title }}'
on:
pull_request:
types:
- opened # A pull request was created.
- reopened # A closed pull request was reopened.
- edited # A pull request's title, body, or labels are edited.
- synchronize # A pull request's branch was synchronized with its base branch.
- unlocked # Conversation on a pull request was unlocked.
paths-ignore:
- 'docs/**'
- 'README.md'
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
issues: read
pull-requests: write
jobs:
check_linked_issues:
name: Check linked issues
runs-on:
group: ${{ vars.RUN_GROUP }}
steps:
- uses: nearform-actions/github-action-check-linked-issues@v1
check_pr:
name: Check PR
runs-on:
group: ${{ vars.RUN_GROUP }}
permissions:
statuses: write
steps:
- name: Check PR Title
uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
paths_filter:
name: Paths Filter
runs-on:
group: ${{ vars.RUN_GROUP }}
outputs:
infra: ${{ steps.filter.outputs.infra }}
app: ${{ steps.filter.outputs.app }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
infra:
- '${{ vars.TF_DIRECTORY }}/**'
app:
- 'src/**'
ci:
name: CI
uses: ./.github/workflows/sub-ci.yml
needs: [paths_filter]
secrets: inherit
with:
infra: ${{ needs.paths_filter.outputs.infra == 'true' }}
app: ${{ needs.paths_filter.outputs.app == 'true' }}
merge_check:
name: Merge Check
runs-on:
group: ${{ vars.RUN_GROUP }}
if: ${{ always() && !cancelled() && !failure() }}
needs: [check_linked_issues, check_pr, ci]
steps:
- run: echo "CI is successful"