Skip to content

Commit 81741e0

Browse files
author
Ondrej Machala
committed
fix: update-screenshots workflow creates PR instead of direct push
1 parent 0f2d626 commit 81741e0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/update-screenshots.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,16 @@ jobs:
4141
echo "changed=false" >> $GITHUB_OUTPUT
4242
fi
4343
44-
- name: Commit and push
44+
- name: Create PR with updated screenshots
4545
if: steps.changes.outputs.changed == 'true'
4646
run: |
4747
git config user.name "github-actions[bot]"
4848
git config user.email "github-actions[bot]@users.noreply.github.com"
49+
BRANCH="chore/update-screenshots-$(date +%Y%m%d-%H%M%S)"
50+
git checkout -b "$BRANCH"
4951
git add docs/public/screenshots/
5052
git commit -m "chore: update screenshots"
51-
git push
52-
53-
- name: Trigger docs deploy
54-
if: steps.changes.outputs.changed == 'true'
55-
run: gh workflow run deploy-docs.yml
53+
git push -u origin "$BRANCH"
54+
gh pr create --title "chore: update screenshots" --body "Automated screenshot update from heroshot sync." --base main
5655
env:
5756
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)