mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +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:
parent
920a878eaa
commit
f62b022872
1 changed files with 12 additions and 5 deletions
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
|
|
@ -3,6 +3,13 @@ name: "CI"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
dogfood:
|
||||||
|
description: 'Use dogfood Nix build'
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
|
||||||
|
|
@ -15,7 +22,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/install-nix-action
|
- uses: ./.github/actions/install-nix-action
|
||||||
with:
|
with:
|
||||||
dogfood: false
|
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
|
||||||
extra_nix_config:
|
extra_nix_config:
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -54,7 +61,7 @@ jobs:
|
||||||
- uses: ./.github/actions/install-nix-action
|
- uses: ./.github/actions/install-nix-action
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
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
|
# The sandbox would otherwise be disabled by default on Darwin
|
||||||
extra_nix_config: "sandbox = true"
|
extra_nix_config: "sandbox = true"
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
|
@ -217,7 +224,7 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: ./.github/actions/install-nix-action
|
- uses: ./.github/actions/install-nix-action
|
||||||
with:
|
with:
|
||||||
dogfood: false
|
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
|
||||||
extra_nix_config:
|
extra_nix_config:
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -248,7 +255,7 @@ jobs:
|
||||||
path: flake-regressions/tests
|
path: flake-regressions/tests
|
||||||
- uses: ./.github/actions/install-nix-action
|
- uses: ./.github/actions/install-nix-action
|
||||||
with:
|
with:
|
||||||
dogfood: false
|
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
|
||||||
extra_nix_config:
|
extra_nix_config:
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -269,7 +276,7 @@ jobs:
|
||||||
- uses: ./.github/actions/install-nix-action
|
- uses: ./.github/actions/install-nix-action
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
dogfood: false
|
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
experimental-features = flakes nix-command ca-derivations impure-derivations
|
experimental-features = flakes nix-command ca-derivations impure-derivations
|
||||||
max-jobs = 1
|
max-jobs = 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue