1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

ci: add workflow dispatch to bypass nix installer dogfooding

This helps to fix CI if our dogfooding Nix installer is broken
This commit is contained in:
Jörg Thalheim 2025-08-11 19:29:08 +02:00
parent 920a878eaa
commit f62b022872

View file

@ -3,6 +3,13 @@ name: "CI"
on:
pull_request:
push:
workflow_dispatch:
inputs:
dogfood:
description: 'Use dogfood Nix build'
required: false
default: true
type: boolean
permissions: read-all
@ -15,7 +22,7 @@ jobs:
fetch-depth: 0
- uses: ./.github/actions/install-nix-action
with:
dogfood: false
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
extra_nix_config:
experimental-features = nix-command flakes
github_token: ${{ secrets.GITHUB_TOKEN }}
@ -54,7 +61,7 @@ jobs:
- uses: ./.github/actions/install-nix-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
dogfood: false
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
# The sandbox would otherwise be disabled by default on Darwin
extra_nix_config: "sandbox = true"
- uses: DeterminateSystems/magic-nix-cache-action@main
@ -217,7 +224,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-nix-action
with:
dogfood: false
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
extra_nix_config:
experimental-features = nix-command flakes
github_token: ${{ secrets.GITHUB_TOKEN }}
@ -248,7 +255,7 @@ jobs:
path: flake-regressions/tests
- uses: ./.github/actions/install-nix-action
with:
dogfood: false
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
extra_nix_config:
experimental-features = nix-command flakes
github_token: ${{ secrets.GITHUB_TOKEN }}
@ -269,7 +276,7 @@ jobs:
- uses: ./.github/actions/install-nix-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
dogfood: false
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
extra_nix_config: |
experimental-features = flakes nix-command ca-derivations impure-derivations
max-jobs = 1