승인된 변경사항을 운영 브랜치에 반영한다 #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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 |