hosts/osmium: deploy nixfiles inputs update script
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "nixfiles-updated-inputs.sh";
|
||||
name = "nixfiles-updated-inputs";
|
||||
text = builtins.readFile ./nixfiles-updated-inputs.sh;
|
||||
runtimeInputs = [
|
||||
pkgs.git
|
||||
runtimeInputs = with pkgs; [
|
||||
git
|
||||
nix
|
||||
openssh
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -4,10 +4,15 @@ set -euo pipefail
|
||||
|
||||
NOW="$(date --utc --iso-8601=minutes)"
|
||||
|
||||
git fetch origin master
|
||||
git status || git clone gitea@git.clerie.de:clerie/nixfiles.git .
|
||||
echo "[!] Download changes"
|
||||
git fetch --all
|
||||
git checkout updated-inputs
|
||||
git merge -s ort -X theirs origin/master -m "Update from master ${NOW}"
|
||||
git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" merge -s ort -X theirs origin/master -m "Update from master ${NOW}"
|
||||
echo "[!] Update inputs"
|
||||
nix flake update
|
||||
echo "[!] Commit changes"
|
||||
git add flake.lock
|
||||
git commit -m "Flake update ${NOW}" || true
|
||||
git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" commit -m "Flake update ${NOW}" || true
|
||||
echo "[!] Publish"
|
||||
git push origin updated-inputs
|
||||
|
Reference in New Issue
Block a user