Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d029a1a commit 319acf3Copy full SHA for 319acf3
.github/workflows/reusable-context.yml
@@ -97,6 +97,7 @@ jobs:
97
run: python Tools/build/compute-changes.py
98
env:
99
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
100
+ GITHUB_EVENT_NAME: ${{ github.event_name }}
101
CCF_TARGET_REF: ${{ github.base_ref || github.event.repository.default_branch }}
102
CCF_HEAD_REF: ${{ github.event.pull_request.head.sha || github.sha }}
103
Tools/build/compute-changes.py
@@ -57,7 +57,7 @@ class Outputs:
57
58
def compute_changes() -> None:
59
target_branch, head_ref = git_refs()
60
- if target_branch and head_ref:
+ if os.environ.get("GITHUB_EVENT_NAME", "") == "pull_request":
61
# Getting changed files only makes sense on a pull request
62
files = get_changed_files(target_branch, head_ref)
63
outputs = process_changed_files(files)
0 commit comments