feat(ci): allow triggering test or build-docs individually
workflow_dispatch already ran the whole pipeline manually, but there was no way to fire just one job (e.g. re-run docs generation without re-running the fish test suite) the way the old standalone build-docs.yml let you. Add a job choice input (all/test/build-docs, defaulting to all) and gate each job on it via `if:`, while leaving the push-triggered path's needs: test gating untouched.
This commit is contained in:
@@ -17,9 +17,20 @@ on:
|
|||||||
- "integrations/**"
|
- "integrations/**"
|
||||||
- "tests/**"
|
- "tests/**"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
job:
|
||||||
|
description: "Job to run"
|
||||||
|
required: false
|
||||||
|
default: all
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- all
|
||||||
|
- test
|
||||||
|
- build-docs
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
if: github.event_name != 'workflow_dispatch' || github.event.inputs.job == 'all' || github.event.inputs.job == 'test'
|
||||||
runs-on: racknerd-mini
|
runs-on: racknerd-mini
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -40,6 +51,11 @@ jobs:
|
|||||||
|
|
||||||
build-docs:
|
build-docs:
|
||||||
needs: test
|
needs: test
|
||||||
|
if: |
|
||||||
|
always() &&
|
||||||
|
(github.event.inputs.job == 'build-docs' ||
|
||||||
|
((github.event_name != 'workflow_dispatch' || github.event.inputs.job == 'all') &&
|
||||||
|
needs.test.result == 'success'))
|
||||||
runs-on: racknerd-mini
|
runs-on: racknerd-mini
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
Reference in New Issue
Block a user