about summary refs log tree commit diff
path: root/.github/workflows/update.yml
blob: 4503baa3ca30b1c86577ac1c87cde7566e8b42d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: Nix Autoupdater
on:
  workflow_dispatch: {}
  schedule:
    - cron: "0 0 * * *"
jobs:
  update-packages:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: cachix/install-nix-action@v24
        with:
          extra_nix_config: |
            access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
            accept-flake-config = true
      - run: |
          nix shell nixpkgs#git -c git config user.name 'NixBot'
          nix shell nixpkgs#git -c git config user.email 'fcuny@users.noreply.github.com'
          nix flake update
          nix shell nixpkgs#git -c git commit -am "[Auto] update all inputs"
      - name: Commit & Push changes
        uses: actions-js/push@v1.4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}