Skip to content

Commit f0695e1

Browse files
committed
ci: Make it actually possible to disable dogfooding
Github composite actions are a real treat. Boolean inputs are not actually booleans but rather strings [1]. [1]: https://www.github.com/actions/runner/issues/2238
1 parent 3543a73 commit f0695e1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/actions/install-nix-action/action.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
- name: "Download nix install artifact from master"
2020
shell: bash
2121
id: download-nix-installer
22-
if: ${{ inputs.dogfood }}
22+
if: inputs.dogfood == 'true'
2323
run: |
2424
RUN_ID=$(gh run list --repo "$DOGFOOD_REPO" --workflow ci.yml --branch master --status success --json databaseId --jq ".[0].databaseId")
2525
@@ -45,6 +45,6 @@ runs:
4545
- uses: cachix/install-nix-action@c134e4c9e34bac6cab09cf239815f9339aaaf84e # v31.5.1
4646
with:
4747
# Ternary operator in GHA: https://www.github.com/actions/runner/issues/409#issuecomment-752775072
48-
install_url: ${{ inputs.dogfood && format('{0}/install', steps.download-nix-installer.outputs.installer-path) || inputs.install_url }}
49-
install_options: ${{ inputs.dogfood && format('--tarball-url-prefix {0}', steps.download-nix-installer.outputs.installer-path) || '' }}
48+
install_url: ${{ inputs.dogfood == 'true' && format('{0}/install', steps.download-nix-installer.outputs.installer-path) || inputs.install_url }}
49+
install_options: ${{ inputs.dogfood == 'true' && format('--tarball-url-prefix {0}', steps.download-nix-installer.outputs.installer-path) || '' }}
5050
extra_nix_config: ${{ inputs.extra_nix_config }}

0 commit comments

Comments
 (0)