Skip to content

Update Nix Package (Manual) #6

Update Nix Package (Manual)

Update Nix Package (Manual) #6

name: Update Nix Package (Manual)
on:
workflow_dispatch:
inputs:
version:
description: 'Version to update to (e.g., 1.15.0)'
required: true
type: string
permissions:
contents: write
jobs:
update-nix:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.PAT_TOKEN }}
- name: Install Nix
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- name: Update Nix package
run: |
chmod +x scripts/update-nix-version.sh
./scripts/update-nix-version.sh ${{ inputs.version }}
- name: Commit and push Nix update
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add nix/packages/default/default.nix
git commit -m "chore: update nix package to v${{ inputs.version }}" || echo "No changes to commit"
git push origin main
- name: Summary
run: |
echo "✅ Nix package updated to v${{ inputs.version }}"
echo "Check the commit: https://github.com/${{ github.repository }}/commits/main"