Skip to content
This repository was archived by the owner on Aug 18, 2022. It is now read-only.

Commit 0ecddc3

Browse files

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/auto-update.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Auto NPM Update
2+
3+
# Controls when the workflow will run
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 0 * * *" # Runs every day at midnight
8+
9+
jobs:
10+
update:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Setup node
16+
uses: actions/setup-node@v3.2.0
17+
with:
18+
node-version: 18
19+
- name: Update dependencies
20+
run: npm upgrade
21+
- uses: tibdex/github-app-token@v1
22+
id: generate-token
23+
with:
24+
app_id: ${{ secrets.APP_ID }}
25+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
26+
- name: Create Pull Request
27+
uses: peter-evans/create-pull-request@v4
28+
with:
29+
title: "Auto NPM Update"
30+
body: "This PR was created automatically by the Auto NPM Update workflow."
31+
signoff: true
32+
commit-message: "Update dependencies via `npm upgrade`."
33+
branch: "create-pull-request/auto-npm-update"
34+
branch-suffix: "timestamp"
35+
labels: "auto-npm-update,dependencies,javascript"
36+
delete-branch: true
37+
token: ${{ steps.generate-token.outputs.token }}

0 commit comments

Comments
 (0)