Skip to content

Commit

Permalink
add permissions to auto-update
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Sep 5, 2024
1 parent 5e96abf commit dae6ce1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
schedule:
# Runs at 00:00 on the first day of every month
- cron: "0 0 1 * *"
workflow_dispatch: # This allows manual triggering

permissions:
contents: write
pull-requests: write

jobs:
upgrade:
Expand All @@ -28,13 +33,13 @@ jobs:
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Auto upgrade dependencies" || echo "No changes to commit"
git commit -m "upgrade dependencies" || echo "No changes to commit"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Auto upgrade dependencies
commit-message: upgrade dependencies
branch: auto-upgrade-branch
title: "Auto upgrade dependencies"
body: "This PR updates dependencies automatically."
title: "Yarn Upgrade"
body: "This PR updates dependencies via `yarn upgrade`"

0 comments on commit dae6ce1

Please sign in to comment.