2025-12-07 ๋ฌธ์ ํ์์ด์ #30
This file contains hidden or 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: Merge on Ready label | |
| on: | |
| pull_request: | |
| types: [labeled] | |
| concurrency: | |
| group: merge-on-label=${{ github.event.pull_request.number }} | |
| cancel-in-progress: false | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| contents: write | |
| jobs: | |
| auto-merge-check: | |
| name: Ready check & Merge | |
| if: > | |
| github.event.label.name == 'ready-to-merge' && | |
| github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| contents: write | |
| steps: | |
| - name: Ready Check | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const { owner, repo } = context.repo; | |
| const sha = context.payload.pull_request.head.sha; | |
| await github.rest.checks.create({ | |
| owner, | |
| repo, | |
| name: "ready-to-merge", | |
| head_sha: sha, | |
| conclusion: "success", | |
| status: "completed" | |
| }) | |
| - name: Checkout (shallow) | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Merge PR | |
| env: | |
| GH_TOKEN: ${{ secrets.ASSISTANT_GITHUB_TOKEN }} | |
| # check ์กฐ๊ฑด์ด ๋ ๋์ด๋ ์ํฉ์ ๋๋นํด์ auto ์ต์ ์ ์ถ๊ฐํจ | |
| run: | | |
| gh pr merge ${{ github.event.pull_request.number }} \ | |
| --auto \ | |
| --rebase |