-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New script, fix types and resolve tsconfig conflicts
- Loading branch information
1 parent
c7d8fe7
commit 7bd9d0c
Showing
19 changed files
with
945 additions
and
773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Weekly npm update | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 0" # Run every Sunday at midnight UTC | ||
workflow_dispatch: # Enable manual triggering of the workflow | ||
|
||
permissions: | ||
contents: write | ||
issues: write | ||
|
||
jobs: | ||
update-dependencies: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "latest" | ||
|
||
- name: Update dependencies | ||
run: | | ||
npm update | ||
continue-on-error: true | ||
|
||
- name: Check for changes | ||
id: git-check | ||
run: | | ||
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT | ||
- name: Commit and push if changes | ||
if: steps.git-check.outputs.changes == 'true' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add -A | ||
git commit -m "chore: update npm dependencies" | ||
git push | ||
- name: Create issue if update fails | ||
if: failure() | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
github.rest.issues.create({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
title: 'npm update failed', | ||
body: 'The weekly npm update job failed. Please check the action logs for more details.' | ||
}) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.