Skip to content

update flake

update flake #145

Workflow file for this run

name: "update flake"
on:
schedule:
- cron: "15 4 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
outputs: ${{ steps.gen_output.outputs.outputs }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install nix
uses: cachix/install-nix-action@v31
- name: Update flake.lock
run: nix flake update
- name: Add flake.lock
run: git add flake.lock
- name: Check updated flake
run: nix flake check --all-systems
- name: Push new flake.lock
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "Update Flake Inputs: $(date +%F)"
git push
- name: Get outputs
id: gen_output
run: echo "outputs=$(nix flake show --json | jq -c '.nixosConfigurations | keys | map("nixosConfigurations.\(.).config.system.build.toplevel")')" >> "$GITHUB_OUTPUT"
cache:
needs: update
strategy:
matrix:
output: ${{fromJson(needs.update.outputs.outputs)}}
uses: ./.github/workflows/cache.yml
with:
output: ${{ matrix.output }}
secrets: inherit