Skip to content

Commit bea77e0

Browse files
authored
Update create-pr.yml
1 parent adfb4f4 commit bea77e0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/create-pr.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Create Pull Request for Badge Updates
22

33
on:
44
workflow_run:
5-
workflows: ["Check and Update Badges"] # Name of the first workflow
5+
workflows: ["Check and Update Badges"]
66
types:
77
- completed
88

@@ -15,12 +15,19 @@ jobs:
1515
steps:
1616
- name: Checkout repository
1717
uses: actions/checkout@v3
18+
with:
19+
ref: gh-pages # Ensure the base branch is correctly checked out
20+
21+
- name: Fetch all branches
22+
run: |
23+
git fetch --all
24+
git checkout update-badges-${{ github.run_id }}
1825
1926
- name: Create Pull Request
2027
uses: peter-evans/create-pull-request@v5
2128
with:
2229
token: ${{ secrets.GITHUB_TOKEN }}
23-
base: gh-pages # Target branch for the PR
30+
base: gh-pages
2431
branch: update-badges-${{ github.run_id }}
2532
title: "Update badges.json"
2633
body: |

0 commit comments

Comments
 (0)