-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.35 KB
/
production-ff-on-approval.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
name: 승인된 변경사항을 운영 브랜치에 반영한다
on:
pull_request_review:
types: [ submitted ]
jobs:
checks-passed:
permissions:
checks: read
contents: read
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref == 'dev' && github.event.review.state == 'APPROVED'}}
steps:
- name: Check Admin Permission
uses: actions-cool/check-user-permission@v2.2.1
with:
require: 'admin'
- name: Check if all checks are passed
uses: wechuli/allcheckspassed@v1
fast-forward-merging:
needs: checks-passed
permissions:
contents: write
pull-requests: write
issues: write
runs-on: ubuntu-latest
steps:
- name: Get token from Submodule Reader
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.SUBMODULE_APP_ID }}
private-key: ${{ secrets.SUBMODULE_APP_PEM }}
owner: ${{ github.repository_owner }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
token: ${{ steps.app_token.outputs.token }}
fetch-depth: 0
- name: Fast Forward PR
uses: sequoia-pgp/fast-forward@v1
with:
merge: true
comment: always