mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
ci: update env and dependencies for automated dotfiles update
This commit is contained in:
parent
9cf8d90ff3
commit
3cc199cf15
@ -3,28 +3,28 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
# Every day.
|
# Every day.
|
||||||
- cron: '30 0 * * *'
|
- cron: '30 0 * * *'
|
||||||
|
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"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v16
|
- uses: cachix/install-nix-action@v22
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- name: Update flake inputs
|
- name: Update flake inputs
|
||||||
run: |
|
run: |
|
||||||
nix shell nixpkgs#git
|
nix flake lock --impure \
|
||||||
|
--update-input 'dotfiles' \
|
||||||
# This is set by the GitHub Actions bot just to make identifying which commits are automated.
|
--commit-lock-file --commit-lockfile-summary "flake.lock: update dotfiles"
|
||||||
git config user.name 'github-actions[bot]'
|
|
||||||
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
|
||||||
|
|
||||||
nix flake lock --update-input 'dotfiles' --commit-lock-file --commit-lockfile-summary "flake.lock: update dotfiles"
|
|
||||||
- name: Build NixOS configurations that uses the dotfiles
|
- name: Build NixOS configurations that uses the dotfiles
|
||||||
run: nix build .#nixosConfigurations.ni.config.system.build.toplevel
|
run: nix build .#nixosConfigurations.ni.config.system.build.toplevel
|
||||||
- name: Push updates to remote
|
- name: Push updates to remote
|
||||||
run: |
|
run: |
|
||||||
nix flake lock --commit-lock-file
|
|
||||||
git remote remove origin
|
git remote remove origin
|
||||||
git remote add origin https://${{ secrets.GITHUB_TOKEN }}@github.com/foo-dogsquared/nixos-config.git
|
git remote add origin https://${{ secrets.GITHUB_TOKEN }}@github.com/foo-dogsquared/nixos-config.git
|
||||||
git push --set-upstream origin master --tags
|
git push --set-upstream origin master --tags
|
||||||
|
Loading…
Reference in New Issue
Block a user