about summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/update.yml34
1 files changed, 19 insertions, 15 deletions
diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml
index 4503baa..2723a6f 100644
--- a/.github/workflows/update.yml
+++ b/.github/workflows/update.yml
@@ -1,24 +1,28 @@
-name: Nix Autoupdater
+name: 'Update flake.lock'
 on:
-  workflow_dispatch: {}
+  workflow_dispatch:
   schedule:
-    - cron: "0 0 * * *"
+    - cron: '30 5 * * 0'
+# you need to grant permissions to create PR:
+# https://github.com/DeterminateSystems/update-flake-lock/issues/75
 jobs:
-  update-packages:
+  update-flake-lock:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4
-      - uses: cachix/install-nix-action@v24
+      - name: Checkout repository
+        uses: actions/checkout@v4
+      - name: Install Nix
+        uses: cachix/install-nix-action@v23
         with:
           extra_nix_config: |
             access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
-            accept-flake-config = true
-      - run: |
-          nix shell nixpkgs#git -c git config user.name 'NixBot'
-          nix shell nixpkgs#git -c git config user.email 'fcuny@users.noreply.github.com'
-          nix flake update
-          nix shell nixpkgs#git -c git commit -am "[Auto] update all inputs"
-      - name: Commit & Push changes
-        uses: actions-js/push@v1.4
+      - name: Update flake.lock
+        id: update-flake-lock
+        uses: DeterminateSystems/update-flake-lock@v20
         with:
-          github_token: ${{ secrets.GITHUB_TOKEN }}
+          pr-title: "Update flake.lock"
+          commit-msg: "chore: update flake"
+          pr-assignees: fcuny
+          pr-labels: |
+            dependencies
+            automated