on: [push]
jobs:
  test:
    runs-on: nix
    steps:
      - uses: actions/checkout@v4
      - run: git switch -c flake-bump-inputs
      - run: |
          git config --global user.email "sevenofnine+andrea.ciceri@autistici.org"
          git config --global user.name "Seven of Nine"
      - run: nix flake update --commit-lock-file
      - run: git push origin --force flake-bump-inputs
      - run: tea logins add --token ${{secrets.SEVENOFNINE_TOKEN}} --url https://git.aciceri.dev
      - run: tea logins default git.aciceri.dev
      - run: |
          tea pulls create \
            --repo "$GITHUB_REPOSITORY" \
            --title "Update flake's lockfile" \
            --description "```$(git show -s --format=%b)```"
            --assignees aciceri
      # - run: nix-fast-build --no-nom