nixos/.github/workflows/flake-update.yaml
Torjus Håkestad 2433846f88
All checks were successful
Check actions / check-actions-actionlint (push) Successful in 21s
Check actions / check-actions-yamllint (push) Successful in 15s
Run nix flake check / flake-check (push) Successful in 1m36s
Periodic flake update / flake-update (push) Successful in 1m19s
Add signing to flake-update wf
2024-10-08 20:41:40 +02:00

37 lines
1.1 KiB
YAML

---
name: Periodic flake update
on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 */2 * * *"
permissions:
contents: write
jobs:
flake-update:
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:runner-latest
steps:
- uses: actions/checkout@v3
with:
ref: master
- uses: cachix/install-nix-action@v27
- name: configure git
env:
SSH_PRIVKEY: ${{ secrets.BOT_SSH_PRIVKEY }}
SSH_PUBKEY: ${{ secrets.BOT_SSH_PUBKEY }}
run: |
echo "$SSH_PRIVKEY" > "$RUNNER_TEMP/id_ed25519"
echo "$SSH_PUBKEY" > "$RUNNER_TEMP/id_ed25519.pub"
chmod -R 0600 "$RUNNER_TEMP/id_ed25519.pub" "$RUNNER_TEMP/id_ed25519"
git config --global user.name 'torjus-bot'
git config --global user.email 'torjus-bot@git.t-juice.club'
git config --global user.signingKey "$RUNNER_TEMP/id_ed25519.pub"
git config --global gpg.format ssh
git config --global commit.gpgsign true
- name: flake update
run: nix flake update --commit-lock-file
- name: push
run: git push