File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 77 update-and-create-pr :
88 runs-on : ubuntu-latest
99
10+ env :
11+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12+ DEFAULT_BRANCH : " "
13+
1014 steps :
1115 - name : Checkout repository
1216 uses : actions/checkout@v4
2327 run : |
2428 git config user.name "github-actions[bot]"
2529 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
26-
30+
31+ - name : Get default branch
32+ run : echo "DEFAULT_BRANCH=$(gh api repos/${{ github.repository }} --jq .default_branch)" >> $GITHUB_ENV
33+
2734 - name : Commit changes to a new branch
2835 run : |
2936 git checkout -b changes/${{ github.run_id }}
3239 git push -u origin changes/${{ github.run_id }}
3340
3441 - name : Create Pull Request
35- env :
36- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3742 run : |
38- gh pr create --base main --head changes/${{ github.run_id }} --title "Specify project URLs and CMake project" --body "Please review the changes applied by the automated script."
43+ gh pr create --base $DEFAULT_BRANCH --head changes/${{ github.run_id }} --title "Specify project URLs and CMake project" --body "Please review the changes applied by the automated script."
You can’t perform that action at this time.
0 commit comments