2026-03-28 19:27:53 +00:00
|
|
|
name: Update flake inputs
|
2026-05-01 18:52:37 +01:00
|
|
|
|
2026-03-28 19:27:53 +00:00
|
|
|
on:
|
|
|
|
|
schedule:
|
|
|
|
|
- cron: '0 4 * * *' # Daily at 4am UTC
|
2026-05-01 18:52:37 +01:00
|
|
|
workflow_dispatch: # Allow manual trigger from the Actions tab
|
|
|
|
|
|
2026-03-28 19:27:53 +00:00
|
|
|
jobs:
|
|
|
|
|
update:
|
2026-05-01 15:58:24 +01:00
|
|
|
runs-on: fred-nix
|
2026-03-28 19:27:53 +00:00
|
|
|
permissions:
|
|
|
|
|
contents: write
|
2026-05-01 18:52:37 +01:00
|
|
|
|
2026-03-28 19:27:53 +00:00
|
|
|
steps:
|
|
|
|
|
- name: Checkout repo
|
2026-04-08 19:52:48 +01:00
|
|
|
uses: actions/checkout@v6
|
|
|
|
|
|
2026-03-28 19:27:53 +00:00
|
|
|
- name: Install Nix
|
2026-05-01 18:52:37 +01:00
|
|
|
run: |
|
|
|
|
|
set -euxo pipefail
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSfL https://nixos.org/nix/install | sh -s -- --no-daemon
|
|
|
|
|
echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH"
|
|
|
|
|
mkdir -p ~/.config/nix
|
|
|
|
|
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
|
|
|
|
|
|
2026-03-28 19:27:53 +00:00
|
|
|
- name: Update flake inputs
|
|
|
|
|
run: nix flake update
|
2026-05-01 18:52:37 +01:00
|
|
|
|
|
|
|
|
- name: Commit and push
|
|
|
|
|
run: |
|
|
|
|
|
set -euxo pipefail
|
|
|
|
|
if git diff --quiet flake.lock; then
|
|
|
|
|
echo "No changes to flake.lock — skipping commit."
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
git config user.name 'forgejo-actions[bot]'
|
|
|
|
|
git config user.email 'actions@forg.gregersen.it'
|
|
|
|
|
git add flake.lock
|
|
|
|
|
git commit -m 'flake: update inputs'
|
|
|
|
|
git push
|