
name: Auto PR and Merge
on:
push:
branches:
- 'sw**'
- 'cm**'
permissions:
contents: write
pull-requests: write
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GH_TOKEN }}
base: 'main'
branch: ${{ github.ref_name }}
title: "[auto] ${{github.event.head_commit.message}}"
body: |
- 자동 PR: ${{ github.ref_name }} → main
- 커밋 메시지: ${{ github.event.head_commit.message }}
labels: auto-merge
assignees: ${{ github.actor }}
reviewers: ${{ vars.REVIEWERS }}
draft: false
- name: Enable Auto Merge
# if: contains(github.event.pull_request.labels.*.name, 'auto-merge')
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ secrets.GH_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
I followed the instructions above, but no PR is created automatically. When I try to create one manually, it shows no changes, just like in the screenshot.
I followed the instructions above, but no PR is created automatically. When I try to create one manually, it shows no changes, just like in the screenshot.