-
-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (33 loc) · 1.2 KB
/
dependencies.yml
File metadata and controls
39 lines (33 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Update Dependencies
on:
schedule:
- cron: "0 0 * * *"
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Update Dependencies
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git pull origin main
git checkout -B update-dependencies
bun update
bun i
git add package.json bun.lock
git commit -m "chore(deps): update dependencies" || true
git push -f origin update-dependencies
curl -sL -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls" \
-d "{\"title\": \"chore(deps): update dependencies\", \"head\": \"update-dependencies\", \"base\": \"main\", \"body\": \"Automatically generated PR to update dependencies.\"}"