workflow: drop GitHub-only actions for the update job

Replaces cachix/install-nix-action and stefanzweifel/git-auto-commit-action
with inline shell so the workflow no longer touches github.com. Still pulls
the runner image from Docker Hub and the install script from nixos.org —
those are deliberately left for now and can be cut in a follow-up.

actions/checkout stays because it's mirrored on data.forgejo.org and the
runner already resolves it there.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
ediblerope 2026-05-01 18:52:37 +01:00
parent 046b4bff90
commit bcefe9aa26

View file

@ -1,33 +1,40 @@
name: Update flake inputs name: Update flake inputs
on: on:
schedule: schedule:
- cron: '0 4 * * *' # Daily at 4am UTC - cron: '0 4 * * *' # Daily at 4am UTC
workflow_dispatch: # Allow manual trigger from GitHub Actions tab workflow_dispatch: # Allow manual trigger from the Actions tab
jobs: jobs:
update: update:
runs-on: fred-nix runs-on: fred-nix
permissions: permissions:
contents: write contents: write
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install Nix - name: Install Nix
uses: cachix/install-nix-action@v31 run: |
with: set -euxo pipefail
nix_path: nixpkgs=channel:nixos-unstable curl --proto '=https' --tlsv1.2 -sSfL https://nixos.org/nix/install | sh -s -- --no-daemon
extra_nix_config: | echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH"
experimental-features = nix-command flakes mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
- name: Update flake inputs - name: Update flake inputs
run: nix flake update run: nix flake update
- name: Commit updated flake.lock - name: Commit and push
uses: stefanzweifel/git-auto-commit-action@v7 run: |
with: set -euxo pipefail
commit_message: "flake: update inputs" if git diff --quiet flake.lock; then
file_pattern: flake.lock 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