From f62b022872e5920c920934b9d23b4bfea4fc90d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 11 Aug 2025 19:29:08 +0200 Subject: [PATCH] ci: add workflow dispatch to bypass nix installer dogfooding This helps to fix CI if our dogfooding Nix installer is broken --- .github/workflows/ci.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0db256ff3..06ee05580 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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