Skip to content

Use restore-only ccache on pull_request_target#68

Closed
poofeth wants to merge 1 commit into
protocolbuffers:mainfrom
poofeth:fix-pull-request-target-ccache-restore-only
Closed

Use restore-only ccache on pull_request_target#68
poofeth wants to merge 1 commit into
protocolbuffers:mainfrom
poofeth:fix-pull-request-target-ccache-restore-only

Conversation

@poofeth

@poofeth poofeth commented Jun 3, 2026

Copy link
Copy Markdown

This updates the ccache setup action to use actions/cache/restore for pull_request_target runs.

pull_request_target jobs can run code from a fork after maintainer approval. In that context, the job should be able to restore existing ccache state, but it should not save new .ccache contents back into a cache namespace later consumed by trusted branch runs.

This matches the restore-only pattern already used by composer-setup and internal/ccache-setup-windows.

Validation:

  • Parsed ccache/action.yml as YAML.
  • Confirmed the trusted cache step still uses actions/cache when github.event_name != 'pull_request_target'.
  • Confirmed the pull_request_target path now uses actions/cache/restore with the same path, key, and restore keys.

@google-cla

google-cla Bot commented Jun 3, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@poofeth poofeth marked this pull request as ready for review June 3, 2026 22:51
@poofeth

poofeth commented Jun 4, 2026

Copy link
Copy Markdown
Author

Closing this PR so I can resubmit the same fix from the CLA-covered GitHub account associated with tjbarton3@gmail.com.

@poofeth poofeth closed this Jun 4, 2026
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.

1 participant