Skip to content

Update Flakes

Update Flakes #1624

Workflow file for this run

name: Update Flakes
on:
schedule:
- cron: "50 0 * * 0"
workflow_dispatch:
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
get-flakes:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.get-flakes.outputs.matrix }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: cachix/install-nix-action@6a9a9e84a173d90b3ffb42c5ddaf9ea033fad011 # v23
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: generate flake matrix
id: get-flakes
run: |
set -euo pipefail
flakes="$(nix flake metadata --json | jq -rcM '.locks.nodes.root.inputs | {flake: keys}')"
echo "matrix=$flakes" >> "$GITHUB_OUTPUT"
flake-update:
runs-on: ubuntu-latest
needs:
- get-flakes
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.get-flakes.outputs.matrix) }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: cachix/install-nix-action@6a9a9e84a173d90b3ffb42c5ddaf9ea033fad011 # v23
with:
nix_path: nixpkgs=channel:nixos-unstable-small
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: actions/create-github-app-token@v1.9.0
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: cpcloud/flake-update-action@v1.0.4
with:
dependency: ${{ matrix.flake }}
github-token: ${{ secrets.GITHUB_TOKEN }}
pull-request-token: ${{ steps.generate-token.outputs.token }}
pull-request-author: "phillip-ground[bot] <phillip-ground[bot]@users.noreply.github.com>"
pull-request-labels: dependencies,autorebase:opt-in
automerge: true
delete-branch: true