- commit
- eed27b85eab5ee4c1e2be0bdd7149aeea216d249
- parent
- 009c3d5a115c74c275f28ca399691b647896c6a5
- author
- Dami <dami.etoile@gmail.com>
| M | .github/ | 20 | +++++++++++++++++--- |
@@ -11,6 +11,7 @@ on:
1111 1212 permissions:1313 contents: write14+ pull-requests: write1415 1516 jobs:1617 generate-gifs:@@ -41,14 +42,27 @@ jobs:
4142 vhs vhs/hashiwokakero.tape4243 vhs vhs/lightsout.tape4344 44- - name: Commit updated GIFs45+ - name: Create PR with updated GIFs4546 run: |4647 git config user.name "github-actions[bot]"4748 git config user.email "github-actions[bot]@users.noreply.github.com"4849 git add vhs/*.gif4950 if git diff --cached --quiet; then5051 echo "No GIF changes to commit"52+ exit 053+ fi54+ branch="chore/regenerate-vhs-gifs"55+ git checkout -b "$branch"56+ git commit -m "chore: regenerate VHS GIFs"57+ git push --force origin "$branch"58+ if gh pr list --head "$branch" --state open --json number --jq '.[0].number' | grep -q .; then59+ echo "PR already exists"5160 else52- git commit -m "chore: regenerate VHS GIFs"53- git push61+ gh pr create \62+ --title "chore: regenerate VHS GIFs" \63+ --body "Auto-generated by the VHS workflow. Merge to update game preview GIFs." \64+ --head "$branch" \65+ --base main5466 fi67+ env:68+ GH_TOKEN: ${{ github.token }}