Files
flakey/.gitea/workflows/flake-update.yml

48 lines
1.0 KiB
YAML

name: Update nix flake inputs
on:
schedule:
# Every Sunday at 03:00 UTC
- cron: "0 3 * * 0"
workflow_dispatch: {}
jobs:
flake-update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Git Config
run: |
git config user.name "gitea-actions"
git config user.email "actions@${GITEA_SERVER_HOST:-gitea.local}"
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_conf: |
experimental-features = nix-command flakes
- name: Update flake.lock
run: nix flake update
- name: Commit flake.lock
run: |
if git diff --quiet flake.lock; then
echo "No changes to flake.lock"
exit 0
fi
git add flake.lock
git commit -m "Update flake inputs"
git push