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/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 27526e339 ci: Fix plan not generated correctly for PR from forked repo
(#3327)
27526e339 is described below
commit 27526e33978d79d8b35cec62e4b715603c63920c
Author: Xuanwo <[email protected]>
AuthorDate: Tue Oct 17 23:33:26 2023 +0800
ci: Fix plan not generated correctly for PR from forked repo (#3327)
* ci: Fix plan not generated correctly for PR from forked repo
Signed-off-by: Xuanwo <[email protected]>
* Fix
Signed-off-by: Xuanwo <[email protected]>
---------
Signed-off-by: Xuanwo <[email protected]>
---
.github/workflows/test_planner.yml | 10 +++++-----
scripts/workflow_planner.py | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/test_planner.yml
b/.github/workflows/test_planner.yml
index b6abca42b..29eabd6f9 100644
--- a/.github/workflows/test_planner.yml
+++ b/.github/workflows/test_planner.yml
@@ -47,19 +47,19 @@ jobs:
event_name="${{ github.event_name }}"
repository="${{ github.repository }}"
files_changed=""
- has_secrets="False"
- is_push="False"
+ has_secrets="false"
+ is_push="false"
# Handle event-specific logic
if [ "$event_name" == "push" ]; then
if [ "$repository" == "apache/incubator-opendal" ]; then
- is_push="True"
- has_secrets="True"
+ is_push="true"
+ has_secrets="true"
fi
elif [ "$event_name" == "pull_request" ]; then
pr_head_repo_fork="${{ github.event.pull_request.head.repo.fork }}"
if [ "$pr_head_repo_fork" != "true" ]; then
- has_secrets="True"
+ has_secrets="true"
fi
git fetch origin main:main
diff --git a/scripts/workflow_planner.py b/scripts/workflow_planner.py
index 7c8d8f9d7..534c68ae5 100755
--- a/scripts/workflow_planner.py
+++ b/scripts/workflow_planner.py
@@ -40,8 +40,8 @@ def get_provided_cases():
# Check if this workflow needs to read secrets.
#
# We will check if pattern `secrets.XXX` exist in content.
- if not bool(os.getenv("GITHUB_HAS_SECRETS")):
- cases[:] = [v for v in cases if "secrets." not in v["content"]]
+ if not os.getenv("GITHUB_HAS_SECRETS") == "true":
+ cases[:] = [v for v in cases if "secrets" not in v["content"]]
return cases
@@ -57,7 +57,7 @@ def calculate_core_cases(cases, changed_files):
return cases
# Always run all tests if it is a push event.
- if bool(os.getenv("GITHUB_IS_PUSH")):
+ if os.getenv("GITHUB_IS_PUSH") == "true":
return cases
# If any of the core files changed, we will run all cases.