From e7d6ef876984dbf883de93e297dea53cd4a65ef2 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Wed, 19 May 2021 06:43:19 -0700 Subject: [PATCH 1/2] run niv update workflow when sources change --- ci/niv-cron.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ci/niv-cron.nix b/ci/niv-cron.nix index 940447b0..b56446ca 100644 --- a/ci/niv-cron.nix +++ b/ci/niv-cron.nix @@ -8,7 +8,15 @@ with lib; { gh-actions.env.CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}"; gh-actions = { - on = { + on = let + paths = [ "nix/*" "ci/*" ]; + in { + push = { + inherit paths; + }; + pull_request = { + inherit paths; + }; schedule = [ { cron = "0 */6 * * *"; } ]; From 5a484181ca2c259232fb653707929231e0e78ed6 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Wed, 19 May 2021 06:43:45 -0700 Subject: [PATCH 2/2] push niv updates to gitea remote --- ci/niv-cron.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/niv-cron.nix b/ci/niv-cron.nix index b56446ca..888d2ba1 100644 --- a/ci/niv-cron.nix +++ b/ci/niv-cron.nix @@ -47,7 +47,9 @@ with lib; { export GIT_{COMMITTER,AUTHOR}_EMAIL=kat@kittywit.ch export GIT_{COMMITTER,AUTHOR}_NAME=kat witch git commit --message="ci-trusted: niv update" - GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git push + git remote add gitea ssh://gitea@git.kittywit.ch:62954/kat/nixfiles.git + GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" \ + git push gitea master fi fi '';