Skip to content

Fix cleanup-caches workflow for PRs from forks #507

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 2 commits into from
Jul 5, 2025

Conversation

bobpaw
Copy link
Collaborator

@bobpaw bobpaw commented Jul 4, 2025

Fix cleanup-caches workflow for PRs from forks

  • .github/workflows/cleanup-caches.yml: change trigger type to
    pull_request_target which should provide a read-write token.

I am pretty sure that this works correctly, but cannot test it effectively because the cmake.yml workflow only runs for PRs which target the develop branch and the pull_request_target only runs when the base branch has the changed workflow file.

@cwsmith, do we want to merge this and then create a bogus testing PR? Or make a contrived branch with cmake.yml which runs for PRs which do not target develop, alter cleanup-caches.yml also, then make a bogus PR which targets that contrived branch, runs the cmake.yml workflow, and then close it to confirm it works?

Confirmed with https://github.com/SCOREC/core/actions/runs/16089570529 which ran on a PR from a forked branch.

bobpaw added 2 commits July 4, 2025 00:00
- .github/workflows/cleanup-caches.yml: change trigger type to
  pull_request_target which should provide a read-write token.
- meaningless change to CMakeLists.txt to activate cmake CI

Signed-off-by: Aiden Woodruff <[email protected]>
@bobpaw
Copy link
Collaborator Author

bobpaw commented Jul 4, 2025

FYI this should be squashed when it is merged

@bobpaw bobpaw requested a review from cwsmith July 5, 2025 15:36
Copy link
Contributor

@cwsmith cwsmith left a comment

Choose a reason for hiding this comment

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

Nice. Thank you.

@cwsmith cwsmith merged commit 9c983f8 into develop Jul 5, 2025
1 check passed
@cwsmith cwsmith deleted the apw/fix-cache-cleanup branch July 5, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants