This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 91c42e527 ci: Allow test_behavior to be called with dispatch (#6850)
91c42e527 is described below
commit 91c42e527075bb9c15227229c7acf5bc0c1a5e89
Author: Xuanwo <[email protected]>
AuthorDate: Mon Dec 1 17:55:50 2025 +0800
ci: Allow test_behavior to be called with dispatch (#6850)
Signed-off-by: Xuanwo <[email protected]>
---
.github/workflows/full-ci-promote.yml | 12 ++++++------
.github/workflows/test_behavior.yml | 14 ++++++++++++++
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/full-ci-promote.yml
b/.github/workflows/full-ci-promote.yml
index 5621de6f7..d52f1ec0f 100644
--- a/.github/workflows/full-ci-promote.yml
+++ b/.github/workflows/full-ci-promote.yml
@@ -94,15 +94,14 @@ jobs:
core.setOutput('mirror_pr_number', mirrorPr.number);
core.setOutput('mirror_pr_html_url', mirrorPr.html_url);
- - name: Trigger CI workflows
+ - name: Trigger Behavior Test
uses: actions/github-script@v7
env:
TARGET_BRANCH: ci/pr-${{ github.event.pull_request.number }}
with:
script: |
const workflows = [
- 'ci_core.yml',
- 'test_behavior.yml',
+ { id: 'test_behavior.yml', inputs: { pr_number:
`${context.payload.pull_request.number}` } },
];
const owner = context.repo.owner;
const repo = context.repo.repo;
@@ -112,10 +111,11 @@ jobs:
await github.rest.actions.createWorkflowDispatch({
owner,
repo,
- workflow_id: workflow,
+ workflow_id: workflow.id,
ref,
+ inputs: workflow.inputs,
});
- core.info(`Dispatched ${workflow} on ref ${ref}`);
+ core.info(`Dispatched ${workflow.id} on ref ${ref}`);
}
- name: Comment on PR
@@ -135,7 +135,7 @@ jobs:
marker,
'Maintainer triggered full CI with repository secrets.',
`Please monitor the mirrored CI PR for results: ${mirrorUrl}`,
- 'Workflows dispatched: ci_core.yml, test_behavior.yml.',
+ 'Workflows dispatched: test_behavior.yml.',
'Re-applying the label will refresh this mirror.',
].join('\n');
diff --git a/.github/workflows/test_behavior.yml
b/.github/workflows/test_behavior.yml
index d51e91afc..1558eac8a 100644
--- a/.github/workflows/test_behavior.yml
+++ b/.github/workflows/test_behavior.yml
@@ -24,6 +24,12 @@ on:
pull_request:
branches:
- main
+ workflow_dispatch:
+ inputs:
+ pr_number:
+ description: "Upstream PR number (for mirrored runs)"
+ required: false
+ type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
@@ -66,6 +72,14 @@ jobs:
files_changed=$(git diff --name-only ${{
github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})
echo "Files changed:"
echo "$files_changed"
+ elif [ "$event_name" == "workflow_dispatch" ]; then
+ # Mirror runs are explicitly triggered by maintainers; allow
secrets.
+ has_secrets="true"
+ # Compare against main to infer affected components.
+ git fetch --no-tags --prune --depth=1 origin main
+ files_changed=$(git diff --name-only origin/main HEAD)
+ echo "Files changed (main..HEAD):"
+ echo "$files_changed"
fi
# Export variables