2022-07-08 01:37:26 +00:00
|
|
|
name: "Automated flake input update for my dotfiles"
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# Every day.
|
|
|
|
- cron: '30 0 * * *'
|
2023-07-01 04:28:59 +00:00
|
|
|
env:
|
|
|
|
GIT_AUTHOR_NAME: "github-actions[bot]"
|
|
|
|
GIT_COMMITTER_NAME: "github-actions[bot]"
|
|
|
|
GIT_COMMITTER_NAME: "github-actions[bot]"
|
|
|
|
GIT_COMMITTER_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
2022-07-08 01:37:26 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-07-01 04:28:59 +00:00
|
|
|
- uses: cachix/install-nix-action@v22
|
2022-07-08 01:37:26 +00:00
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: Update flake inputs
|
|
|
|
run: |
|
2023-07-01 04:28:59 +00:00
|
|
|
nix flake lock --impure \
|
|
|
|
--update-input 'dotfiles' \
|
|
|
|
--commit-lock-file --commit-lockfile-summary "flake.lock: update dotfiles"
|
2022-07-08 01:37:26 +00:00
|
|
|
- name: Build NixOS configurations that uses the dotfiles
|
|
|
|
run: nix build .#nixosConfigurations.ni.config.system.build.toplevel
|
|
|
|
- name: Push updates to remote
|
|
|
|
run: |
|
|
|
|
git remote remove origin
|
|
|
|
git remote add origin https://${{ secrets.GITHUB_TOKEN }}@github.com/foo-dogsquared/nixos-config.git
|
|
|
|
git push --set-upstream origin master --tags
|