From 745a2c01dea274b436c6b2bbac539b3957bce2b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 13 Oct 2024 13:32:50 +0200 Subject: [PATCH] update using renovate --- .github/workflows/update.yaml | 26 -------------------------- config/services/renovate.nix | 6 +++++- renovate.json | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/update.yaml create mode 100644 renovate.json diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml deleted file mode 100644 index 35680b3e..00000000 --- a/.github/workflows/update.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: update-flake-lock -on: - workflow_dispatch: # allows manual triggering - schedule: - - cron: "3 18 * * *" -jobs: - lockfile: - runs-on: ubuntu-latest - steps: - - run: sh <(curl -L https://nixos.org/nix/install) --daemon - - name: Checkout repository - uses: actions/checkout@v4 - - name: update flake lock - run: nix flake update - - name: run update script - run: | - cd packages - yes "" | ./update.sh - - name: run nix fmt - run: nix fmt - - name: Commit and push - uses: https://github.com/peter-evans/create-pull-request@v7 - with: - commit-message: "Automatic Update" - title: Run automatic update - author: GitHub diff --git a/config/services/renovate.nix b/config/services/renovate.nix index 37290dd2..6cf9a53c 100644 --- a/config/services/renovate.nix +++ b/config/services/renovate.nix @@ -17,7 +17,11 @@ nix.enabled = true; lockFileMaintenance.enabled = true; osvVulnerabilityAlerts = true; - allowedPostUpgradeCommands = ["^cargo2nix -o$" "^alejandra \\.$"]; + allowedPostUpgradeCommands = [ + "^cargo2nix -o$" + "^alejandra \\.$" + "^cd packages; yes '' | \\./update.sh$" + ]; allowCustomCrateRegistries = true; }; credentials = { diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..3a3c2d8a --- /dev/null +++ b/renovate.json @@ -0,0 +1,16 @@ +{ + "extends": [ + "config:best-practices", + "schedule:automergeDaily", + "schedule:daily" + ], + "postUpgradeTasks": { + "commands": [ + "cd packages; yes '' | ./update.sh", + "alejandra ." + ], + "fileFilters": [ + "packages/**/*" + ] + } +} \ No newline at end of file