feat(gate): support caller setup commands (#224)

This commit is contained in:
Dylan M. Taylor authored and GitHub committed 2026-11-12 21:51:38 -05:00
1 parent 804f702057
commit fd88e26a87
3 files changed
+49

No files matched your search

+15
View File
@@ -17,6 +17,11 @@ on:
type: string
required: false
default: "cargo xtask ci"
setup-command:
description: "Optional setup script, run from the repository root before the gate (for example, fetch SHA-verified corpora)"
type: string
required: false
default: ""
windows-command:
description: "The gate on Windows legs; empty runs `command`"
type: string
@@ -274,6 +279,16 @@ jobs:
save-if: ${{ github.event_name != 'pull_request' && (github.ref_name == github.event.repository.default_branch || (inputs.cache-save-on-dispatch && github.event_name == 'workflow_dispatch')) }}
cache-on-failure: true
- name: Caller setup
if: inputs.setup-command != ''
shell: bash
env:
SETUP: ${{ inputs.setup-command }}
run: |
set -euo pipefail
printf '%s\n' "$SETUP" > "$RUNNER_TEMP/gate-setup.sh"
bash -euo pipefail "$RUNNER_TEMP/gate-setup.sh"
- name: Gate
shell: bash
env: