🏗️ (workflow): check and update

main
Gwenc'hlan 1 month ago
parent 112dfc2b70
commit 200410ea4d

@ -1,32 +1,28 @@
name: Nix Flake Check
name: Validate Nix Flake
on: [pull_request]
on:
workflow_dispatch:
push:
paths:
- '**.nix'
- '**.lock'
- '.github/workflows/check.yml'
jobs:
check:
check-flake:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 1
- name: Install Nix
uses: cachix/install-nix-action@v24
uses: DeterminateSystems/nix-installer-action@main
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Install Nix Linting and Formatting Tools
run: nix-env -i statix nixfmt -f '<nixpkgs>'
- name: Run Statix Lint
run: statix fix
- name: Run Nix Format
run: nix fmt
logger: pretty
- name: Nix Flake Checker
uses: DeterminateSystems/flake-checker-action@v5
- name: Check Flake
run: nix flake check --accept-flake-config

@ -0,0 +1,34 @@
name: Bump Flake Inputs
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
update-lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 1
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
logger: pretty
- name: Update Lockfile
uses: DeterminateSystems/update-flake-lock@main
id: update
with:
pr-title: 'chore(deps): flake inputs'
commit-msg: 'chore(deps): flake inputs'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Merge Changes
run: gh pr merge ${{ steps.update.outputs.pull-request-number }} --squash --delete-branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading…
Cancel
Save