mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
name: "Automated flake inputs update"
|
|
on:
|
|
schedule:
|
|
# Every week on Friday.
|
|
- cron: '0 0 * * 5'
|
|
env:
|
|
NIXPKGS_ALLOW_INSECURE: "1"
|
|
NIXPKGS_ALLOW_BROKEN: "1"
|
|
NIXPKGS_ALLOW_UNFREE: "1"
|
|
|
|
# GitHub bot
|
|
GIT_AUTHOR_NAME: "github-actions[bot]"
|
|
GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
|
GIT_COMMITTER_NAME: "github-actions[bot]"
|
|
GIT_COMMITTER_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
|
- uses: DeterminateSystems/nix-installer-action@v4
|
|
- name: Update flake inputs
|
|
run: |
|
|
nix flake update --commit-lock-file \
|
|
--commit-lockfile-summary 'flake.lock: update inputs'
|
|
- name: Build custom packages
|
|
run: nix build --impure --file ./pkgs
|
|
- name: Build NixOS configurations
|
|
run: nix build --impure .#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
|