diff --git a/.github/workflows/test_planner.yml b/.github/workflows/test_planner.yml index b6abca42b2bb..29eabd6f998e 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 7c8d8f9d71e5..534c68ae5dd3 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.