Skip to content

Update Crush Settings #68

Update Crush Settings

Update Crush Settings #68

name: Update Crush Settings
on:
schedule:
# Run daily at 3:00 UTC
- cron: "0 3 * * *"
workflow_dispatch: # Allow manual triggering
jobs:
update-schema:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: "1.21"
- name: Generate options from schema
run: |
cd scripts && go generate
- name: Format with alejandra
run: |
nix-shell -p alejandra --run "alejandra modules/crush/options/settings.nix"
- name: Check for changes
id: check_changes
run: |
if git diff --quiet modules/crush/options.nix; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Open pull request
if: steps.check_changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v8
with:
commit-message: "chore: update crush schema options"
title: "Update Crush schema options"
body: |
This PR updates the Crush module options from the latest schema.
Generated automatically by the daily schema update workflow.
branch: "update-crush-schema"
base: "master"
delete-branch: true