Skip to content

Commit f3648fd

Browse files
authored
Fix podcast sync workflow for protected main
1 parent 9f10541 commit f3648fd

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

.github/workflows/podcast-sync.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
permissions:
1212
contents: write
13+
pull-requests: write
1314

1415
jobs:
1516
sync-podcast:
@@ -29,10 +30,14 @@ jobs:
2930
- name: Sync podcast feed
3031
run: node .github/scripts/sync-podcast-feed.js
3132

32-
- name: Commit new episodes
33-
run: |
34-
git config --local user.email "action@github.com"
35-
git config --local user.name "GitHub Action"
36-
git add content/podcast
37-
git diff --staged --quiet || git commit -m "Sync new podcast episodes from feed"
38-
git push
33+
- name: Create pull request for new episodes
34+
uses: peter-evans/create-pull-request@v8.1.1
35+
with:
36+
add-paths: |
37+
content/podcast
38+
branch: automation/sync-podcast
39+
commit-message: Sync new podcast episodes from feed
40+
title: Sync new podcast episodes from feed
41+
body: |
42+
Automated podcast sync from the Podbean feed.
43+
delete-branch: true

0 commit comments

Comments
 (0)