8000 gh-122965: Fix `reusable-change-detection.yml` on `workflow_dispatch` by sobolevn · Pull Request #122966 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-122965: Fix reusable-change-detection.yml on workflow_dispatch #122966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Docs build
  • Loading branch information
sobolevn committed Aug 13, 2024
commit 6d04e6dd4a2098a10b8d98ce0762294769c1d728
10 changes: 7 additions & 3 deletions .github/workflows/reusable-change-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ jobs:
.github/workflows/reusable-docs.yml
format: csv # works for paths with spaces
- name: Check for docs changes
# We only want to run this on PRs when related files are changed,
# or when user triggers manual workflow run.
if: >-
(github.event_name == 'pull_request'
&& steps.changed-docs-files.outputs.added_modified_renamed != '')
|| github.event_name == 'workflow_dispatch'
&& steps.changed-docs-files.outputs.added_modified_renamed != ''
) || github.event_name == 'workflow_dispatch'
id: docs-changes
run: |
echo "run-docs=true" >> "${GITHUB_OUTPUT}"
Expand All @@ -143,9 +145,11 @@ jobs:
.github/workflows/reusable-windows-msi.yml
format: csv # works for paths with spaces
- name: Check for changes in MSI installer-related files
# We only want to run this on PRs when related files are changed,
# or when user triggers manual workflow run.
if: >-
(github.event_name == 'pull_request'
&& steps.changed-win-msi-files.outputs.added_modified_renamed != ''
&& steps.changed-win-msi-files.outputs.added_modified_renamed != ''
) || github.event_name == 'workflow_dispatch'
id: win-msi-changes
run: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/reusable-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ jobs:
refspec_pr: '+${{ github.event.pull_request.head.sha }}:remotes/origin/${{ github.event.pull_request.head.ref }}'
steps:
- name: 'Check out latest PR branch commit'
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
8347
- name: 'Check out latest commit'
if: github.event_name != 'pull_request'
uses: actions/checkout@v4
# Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721
- name: 'Fetch commits to get branch diff'
if: github.event_name == 'pull_request'
run: |
# Fetch enough history to find a common ancestor commit (aka merge-base):
git fetch origin ${{ env.refspec_pr }} --depth=$(( ${{ github.event.pull_request.commits }} + 1 )) \
Expand Down
Loading
0