Skip to content

Commit

Permalink
Use CREATE_PR_TOKEN as token for update-dependencies-action
Browse files Browse the repository at this point in the history
Use an org-level fine-grained PAT instead of the default
GITHUB_TOKEN to create the PR if dependencies have changed. This
means that PRs created using the action will trigger all the
usual workflows that a normal PR would trigger (check, test etc)
  • Loading branch information
rebkwok committed Oct 17, 2024
1 parent 05b8f53 commit 1ebf460
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
workflow_dispatch:
schedule:
- cron: "0 23 * * *"

jobs:
update-dependencies:
runs-on: ubuntu-latest
Expand All @@ -13,13 +14,8 @@ jobs:
with:
python-version: "3.11"
install-just: true
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "npm"
cache-dependency-path: package-lock.json

- uses: opensafely-core/update-dependencies-action@main
with:
token: ${{ secrets.CREATE_PR_TOKEN }}
update_command: "just compile-reqs -U"
on_changes_command: "just assets && just docs-build && just test --ignore=tests/functional"

0 comments on commit 1ebf460

Please sign in to comment.