Skip to content

Update Nix packages daily #286

Update Nix packages daily

Update Nix packages daily #286

Workflow file for this run

name: Update Nix packages daily
on:
schedule:
# Run at 00:00 UTC every day
- cron: '0 0 * * *'
workflow_dispatch: # Allow manual trigger
jobs:
update-nix:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Update Nix packages
run: |
# cd node2nix/
# nix-shell -p nodePackages.node2nix --command "node2nix -i ./node-packages.json -o node-packages.nix"
# cd ..
nix flake update
nix fmt --verbose
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add flake.lock node2nix/node-packages.nix
git commit -m "Update node2nix and flake.lock" || echo "No changes to commit"
- name: Push changes
run: |
git push origin HEAD