Skip to content

fix(ci): skip nix-switch in upgrade workflow to avoid git permission issues #2241

fix(ci): skip nix-switch in upgrade workflow to avoid git permission issues

fix(ci): skip nix-switch in upgrade workflow to avoid git permission issues #2241

Workflow file for this run

name: Nix
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
nix-darwin:
runs-on: macos-latest
timeout-minutes: 300
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare System Files
run: |
sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.before-nix-darwin || true
sudo mv /etc/shells /etc/shells.before-nix-darwin || true
- name: Run Nix Darwin
run: make build
- name: Build Host `galactica`
env:
HOST: galactica
run: make build
nix-flake:
runs-on: ubuntu-latest
timeout-minutes: 300
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Flake Check
run: make flake-check
nix-format:
runs-on: ubuntu-latest
timeout-minutes: 300
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Check Formatting
run: make nix-format-check
nix-linux:
runs-on: ubuntu-latest
timeout-minutes: 300
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Nix Linux
env:
NIX_CONFIG_TARGET: home
run: make build
- name: Build Host `kyber`
env:
NIX_CONFIG_TARGET: home
HOST: kyber
run: make build
nix-nixos:
runs-on: ubuntu-latest
timeout-minutes: 300
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Nix NixOS
env:
NIX_CONFIG_TARGET: nixos
run: make build
- name: Build Host `matic`
env:
NIX_CONFIG_TARGET: nixos
HOST: matic
run: make build
nix-test:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Nix Tests
run: make nix-test
nix-check:
if: always()
needs:
- nix-darwin
- nix-flake
- nix-format
- nix-linux
- nix-nixos
- nix-test
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Alls Green
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}