Update lockfile on a schedule #29

Merged
jalil merged 2 commits from ci into main 2024-07-20 16:10:08 +02:00
2 changed files with 27 additions and 6 deletions

View file

@ -1,9 +1,12 @@
on: [push] on:
push:
schedule:
- cron: '12 5 * * *'
jobs: jobs:
check: check:
runs-on: nixos runs-on: nixos
steps: steps:
- uses: https://code.forgejo.org/actions/checkout@v4 - uses: "https://code.forgejo.org/actions/checkout@v4"
- run: nix --version - run: nix --version
- run: nix flake check --keep-going --verbose - run: nix flake check --keep-going --verbose
build: build:
@ -11,10 +14,27 @@ jobs:
strategy: strategy:
matrix: matrix:
target: target:
- audiomenu
- docs - docs
- nvim - jpassmenu
- nixosConfigurations.vm.config.system.build.toplevel - nixosConfigurations.vm.config.system.build.toplevel
- nvim
steps: steps:
- uses: https://code.forgejo.org/actions/checkout@v4 - uses: "https://code.forgejo.org/actions/checkout@v4"
- run: nix --version - run: nix --version
- run: nix build --print-build-logs '.#${{ matrix.target }}' - run: nix build --print-build-logs '.#${{ matrix.target }}'
update-lockfile:
needs: [check build]
runs-on: nixos
if: github.event_name == 'schedule'
steps:
- uses: "https://code.forgejo.org/actions/checkout@v4"
- run: nix --version
- run: nix flake update
- name: nix flake update
run: |
git config user.name 'forgejo-actions'
git config user.email 'forgejo-actions@noreply.salame.cl'
nix flake update --commit-lock-file
- run: nix flake check --keep-going --verbose
- run: git push

View file

@ -6,8 +6,9 @@ on:
- ./**.nix - ./**.nix
- ./flake.lock - ./flake.lock
pull_request: pull_request:
schedule: # scheduled runs are run on my own infrastructure
- cron: 5 4 * * 5 # At 04:05 on Friday. # schedule:
# - cron: 5 4 * * 5 # At 04:05 on Friday.
jobs: jobs:
check: check: