Update Flake Inputs #6502
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
name: "Update Flake Inputs" | |
on: | |
schedule: | |
- cron: '0 */2 * * *' | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: cachix/install-nix-action@v17 | |
with: | |
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm" | |
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.12.0pre20221014_3093bd3/install | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # flakes don't work on shallow clones | |
- name: git-setup | |
run: | | |
git config --global user.name 'Github Actions Are Bad' | |
git config --global user.email '[email protected]' | |
- name: update-flake-inputs | |
run: | | |
set -xeuo pipefail | |
nix flake lock --update-input filestash-src --commit-lock-file --commit-lockfile-summary 'flake.lock: update `inputs.filestash-src`' | |
- name: update-package-lock | |
run: | | |
set -xeuo pipefail | |
nix run .#filestash.passthru.update | |
git add ./dream2nix-packages/filestash/dream-lock.json | |
git commit -m "filestash: update dream-lock.json" || true # ignore error if nothing to commit | |
- name: build-and-check-flake | |
run: | | |
set -xeuo pipefail | |
nix flake check | |
nix build | |
- name: push | |
run: | | |
git push origin HEAD | |