on: [push]
jobs:
  test:
    runs-on: nix
    steps:
      - uses: actions/checkout@v4
      # - run: cat /nix/store/cscv53kqarckmbz6729ngmyxg3y53n9c-push-to-cache.sh
      # - run: |
      #     curl -X 'POST' \
      #       'https://git.aciceri.dev/api/v1/repos/aciceri/emacs/pulls' \
      #       -H 'accept: application/json' \
      #       -H "authorization: Basic 2c2761017ba4c8a8806670a74ef3dc2bf2cacef8" \
      #       -H 'Content-Type: application/json' \
      #       -d '{
      #         "assignee": "aciceri",
      #         "base": "master",
      #         "body": "ciao",
      #         "title": "ciao",
      #         "head": "aciceri/forgejo"
      #       }'
      - run: git switch -c flake-bump-inputs
      - run: |
          git config --global user.email "andrea.ciceri@autistici.org"
          git config --global user.name "Bot"
      # - run: nix flake update --commit-lock-file
      - run: git push origin --force flake-bump-inputs
      - run: tea login add --token $ACICERI_TOKEN --url https://git.aciceri.dev
      - run: tea logins default https://git.aciceri.dev
      - run: tea pull create "test"
      # - run: nix-fast-build --no-nom