diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml new file mode 100644 index 0000000..052cad0 --- /dev/null +++ b/.github/workflows/auto-pr.yml @@ -0,0 +1,30 @@ +name: Auto Create Pull Request + +on: + push: + branches-ignore: + - main + +jobs: + create-pull-request: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GH_TOKEN }} + commit-message: Auto PR from ${{ github.ref_name }} + title: "Auto PR: ${{ github.ref_name }} -> main" + body: | + This is an automated pull request created from the branch ${{ github.ref_name }}. + + Changes in this PR: + ${{ github.event.head_commit.message }} + branch: ${{ github.ref_name }} + base: main + delete-branch: false