daily-tracker

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

bump-infra.yml (1284B)


      1 name: Bump infrastructure flake input
      2 
      3 on:
      4   push:
      5     branches: [main]
      6 
      7 jobs:
      8   bump:
      9     runs-on: native
     10     timeout-minutes: 15
     11     steps:
     12       - name: Bump daily-tracker in infrastructure
     13         run: |
     14           set -euo pipefail
     15 
     16           export GIT_SSH_COMMAND="ssh -i $HOME/.ssh/id_ed25519 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
     17 
     18           INFRA_REPO="ssh://forgejo@git.fnarglebeast.com/silas/infrastructure.git"
     19           BRANCH="bump-daily-tracker"
     20 
     21           # Clone infrastructure repo
     22           WORKDIR=$(mktemp -d)
     23           git clone --depth 1 "$INFRA_REPO" "$WORKDIR"
     24           cd "$WORKDIR"
     25 
     26           # Update the daily-tracker flake input
     27           nix flake update daily-tracker
     28 
     29           # Check if anything changed
     30           if git diff --quiet flake.lock; then
     31             echo "No changes to flake.lock, skipping"
     32             rm -rf "$WORKDIR"
     33             exit 0
     34           fi
     35 
     36           # Commit and push branch
     37           git checkout -b "$BRANCH"
     38           git add flake.lock
     39           git \
     40             -c user.name="Forgejo Actions" \
     41             -c user.email="actions@git.fnarglebeast.com" \
     42             commit -m "chore: bump daily-tracker"
     43           git push -f origin "$BRANCH"
     44 
     45           # Cleanup
     46           rm -rf "$WORKDIR"