Skip to content
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

CI: Alter ci-skip.yml to run in the context of the base of the PR #6889

Merged
merged 1 commit into from
May 9, 2024

Conversation

str4d
Copy link
Contributor

@str4d str4d commented May 9, 2024

This enables the workflow to set the "CI / Required status checks" status to "success" if the PR does not require CI.

@str4d str4d added this to the Release 5.10.0 milestone May 9, 2024
# variable.
# - never running commands with the fork's code checked out (we only require
# its commits to be present in the repository).
pull_request_target:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow won't run for this PR because of this change:

  • The workflow in this branch uses pull_request_target, so won't run in the context of the PR.
  • The workflow currently in master uses pull_request, so won't run in the context of the base branch.

Once we've admin-merged this PR, subsequent PRs should trigger fine, but it will continue to be the case that changes to ci-skip.yml won't actually start being used until after the PR they are in has merged.

This enables the workflow to set the "CI / Required status checks"
status to "success" if the PR does not require CI.
@str4d str4d force-pushed the ci-skip-fork-permissions branch from 29fa434 to 0e769ec Compare May 9, 2024 18:02
@@ -74,7 +85,11 @@ jobs:

print('result=verified' if verified else 'result=skipped')
EOF
CHANGED_FILES=$(git diff --name-only ${{ github.base_ref }}...${{ github.event.pull_request.head.sha }} --) python3 ./subclass.py >> $GITHUB_OUTPUT
CHANGED_FILES=$(git diff --name-only ${{ github.sha }}...$HEAD_SHA --)
echo $CHANGED_FILES
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this for debugging purposes; I plan to remove it once we know this workflow is working.

@str4d str4d added the A-CI Area: Continuous Integration label May 9, 2024
Copy link
Collaborator

@y4ssi y4ssi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@y4ssi y4ssi merged commit 379fa69 into master May 9, 2024
8 checks passed
@y4ssi y4ssi deleted the ci-skip-fork-permissions branch May 9, 2024 18:37
@str4d str4d modified the milestones: Release 5.10.0, Release 5.9.1 May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants