aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/update-deps.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/update-deps.yml')
-rw-r--r--.github/workflows/update-deps.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml
new file mode 100644
index 0000000..95ee71e
--- /dev/null
+++ b/.github/workflows/update-deps.yml
@@ -0,0 +1,33 @@
+name: Update Dependencies
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: "0 0 * * 1"
+
+jobs:
+ update-deps:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: cachix/install-nix-action@v31
+ with:
+ extra_nix_config: "extra-experimental-features = nix-command flakes"
+
+ - name: Update and Hash
+ run: |
+ npm update
+ NEW_HASH=$(nix shell nixpkgs#prefetch-npm-deps -c prefetch-npm-deps package-lock.json)
+ sed -i "s|npmDepsHash = ".*"|npmDepsHash = \"$NEW_HASH\"|" flake.nix
+
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v6
+ with:
+ commit-message: "chore(deps): update npm dependencies"
+ title: "chore(deps): update dependencies"
+ branch: "chore/update-deps"
+ delete-branch: true