File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,15 +34,24 @@ jobs:
3434 - name : Run tests
3535 run : npm test
3636
37- - name : Commit and push changes
37+ - name : Commit and open PR
38+ env :
39+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3840 run : |
3941 git config user.name "github-actions[bot]"
4042 git config user.email "github-actions[bot]@users.noreply.github.com"
41-
43+
4244 if ! git diff --quiet; then
45+ BRANCH="chore/update-dependencies-$(date +%Y%m%d-%H%M%S)"
46+ git checkout -b "$BRANCH"
4347 git add -A
4448 git commit -m "chore: update dependencies"
45- git push
49+ git push origin "$BRANCH"
50+ gh pr create \
51+ --base gh-pages \
52+ --head "$BRANCH" \
53+ --title "chore: update dependencies" \
54+ --body "Automated dependency update via \`npm update\` and bundle rebuild."
4655 else
4756 echo "No changes to commit"
4857 fi
You can’t perform that action at this time.
0 commit comments