diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86374846..d9e94ed0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,18 +15,17 @@ jobs: # Get the current branch name - name: Get branch name - id: branch_name - run: echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})" + run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - # Create a pull request comparing the current branch with itself + # Create a pull request on the current branch - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "Automated Pull Request for changes on ${{ steps.branch_name.outputs.branch }}" - base: ${{ steps.branch_name.outputs.branch }} # Base is the current branch - head: ${{ steps.branch_name.outputs.branch }} # Head is also the current branch - title: "PR: Review changes on ${{ steps.branch_name.outputs.branch }}" - body: "This PR is automatically created to review the changes on branch: ${{ steps.branch_name.outputs.branch }}." + commit-message: "Automated Pull Request for changes on ${{ env.branch }}" + base: ${{ env.branch }} # Base is the current branch + branch: ${{ env.branch }} # Branch is the current branch + title: "PR: Review changes on ${{ env.branch }}" + body: "This PR is automatically created to review the changes on branch: ${{ env.branch }}." reviewers: "" # Optional: Add reviewers labels: "auto-generated" # Optional: Add labels