From a4ce20db5ca0d85d36b5343fe71fd1111a7ff9f1 Mon Sep 17 00:00:00 2001 From: Alexander Lakhin Date: Fri, 7 Mar 2025 17:00:06 +0200 Subject: [PATCH] Support workflow_dispatch event in _meta.yml (#11133) ## Problem Allow for using _meta.yml with workflow_dispatch event. ## Summary of changes Handle this event in the run-kind step; fix and update the description of the run-kind output. --- .github/workflows/_meta.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_meta.yml b/.github/workflows/_meta.yml index 9454533fbb..a3fc125648 100644 --- a/.github/workflows/_meta.yml +++ b/.github/workflows/_meta.yml @@ -19,7 +19,7 @@ on: description: "Tag of the last compute release" value: ${{ jobs.tags.outputs.compute }} run-kind: - description: "The kind of run we're currently in. Will be one of `pr`, `push-main`, `storage-rc`, `storage-release`, `proxy-rc`, `proxy-release`, `compute-rc`, `compute-release` or `merge_queue`" + description: "The kind of run we're currently in. Will be one of `push-main`, `storage-release`, `compute-release`, `proxy-release`, `storage-rc-pr`, `compute-rc-pr`, `proxy-rc-pr`, `pr`, or `workflow-dispatch`" value: ${{ jobs.tags.outputs.run-kind }} permissions: {} @@ -55,6 +55,7 @@ jobs: || (inputs.github-event-name == 'pull_request' && github.base_ref == 'release-compute') && 'compute-rc-pr' || (inputs.github-event-name == 'pull_request' && github.base_ref == 'release-proxy') && 'proxy-rc-pr' || (inputs.github-event-name == 'pull_request') && 'pr' + || (inputs.github-event-name == 'workflow_dispatch') && 'workflow-dispatch' || 'unknown' }} run: | @@ -85,6 +86,9 @@ jobs: BUILD_AND_TEST_RUN_ID=$(gh run list -b $CURRENT_BRANCH -c $CURRENT_SHA -w 'Build and Test' -L 1 --json databaseId --jq '.[].databaseId') echo "tag=$BUILD_AND_TEST_RUN_ID" | tee -a $GITHUB_OUTPUT ;; + workflow-dispatch) + echo "tag=$GITHUB_RUN_ID" | tee -a $GITHUB_OUTPUT + ;; *) echo "Unexpected RUN_KIND ('${RUN_KIND}'), failing to assign build-tag!" exit 1