From d0a875e8e6d891d24cc47d32d98e9a13c90bef9c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 25 Jul 2023 17:23:34 +0200 Subject: [PATCH] Create CI `workflow_dispatch` trigger (#3954) --- .github/workflows/ci.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a3edbff..cf21286 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,10 +10,24 @@ on: branches: [main] schedule: - cron: '0 0 * * *' # runs at 00:00 UTC every day + workflow_dispatch: + inputs: + hub: + description: 'Run HUB' + default: false + type: boolean + tests: + description: 'Run Tests' + default: false + type: boolean + benchmarks: + description: 'Run Benchmarks' + default: false + type: boolean jobs: HUB: - if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event_name == 'push') + if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tests == 'true')) runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -74,6 +88,7 @@ jobs: print(json.dumps(response.json(), indent=2)) Benchmarks: + if: github.event_name != 'workflow_dispatch' || github.event.inputs.benchmarks == 'true' runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -126,6 +141,7 @@ jobs: echo "$(cat benchmarks.log)" >> $GITHUB_STEP_SUMMARY Tests: + if: github.event_name != 'workflow_dispatch' || github.event.inputs.tests == 'true' timeout-minutes: 60 runs-on: ${{ matrix.os }} strategy: