Skip to content

Commit

Permalink
replace main with default branch in update.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusptrs committed Aug 2, 2024
1 parent f40cb17 commit 9647379
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ jobs:
update-and-create-pr:
runs-on: ubuntu-latest

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: ""

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -23,7 +27,10 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Get default branch
run: echo "DEFAULT_BRANCH=$(gh api repos/${{ github.repository }} --jq .default_branch)" >> $GITHUB_ENV

- name: Commit changes to a new branch
run: |
git checkout -b changes/${{ github.run_id }}
Expand All @@ -32,7 +39,5 @@ jobs:
git push -u origin changes/${{ github.run_id }}
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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."
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."

0 comments on commit 9647379

Please sign in to comment.