cleanup #4
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: Auto Pull Request on Push | |
on: | |
push: | |
branches: | |
- '*' # Trigger on any branch | |
jobs: | |
create_pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Get current branch name | |
- name: Get branch name | |
id: branch_name | |
run: echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Auto-generated Pull Request from ${{ steps.branch_name.outputs.branch }}" | |
base: main # Target branch for PR (e.g., main, develop) | |
head: ${{ steps.branch_name.outputs.branch }} # The branch you just pushed to | |
title: "PR: ${{ steps.branch_name.outputs.branch }} to main" | |
body: "This PR was automatically generated after pushing to ${{ steps.branch_name.outputs.branch }}." | |
reviewers: "" # Optional: Add reviewers | |
labels: "auto-generated" # Optional: Add labels |