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

feat(ci): save GitHub Actions cache only on the main branch #4975

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

youtalk
Copy link
Member

@youtalk youtalk commented Jul 11, 2024

Description

https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache

Access restrictions provide cache isolation and security by creating a logical boundary between different branches or tags. Workflow runs can restore caches created in either the current branch or the default branch (usually main).

Saving cache in the PR branch can waste the maximum capacity of 10GB of the GitHub Actions cache. Therefore, this PR modifies the health-check workflow to save cache only when it is executed on the main branch.

Tests performed

Both no-cuda and cuda jobs on this PR's branch were executed actions/cache/restore action only.
https://github.com/autowarefoundation/autoware/actions/runs/9892642537/job/27325824034?pr=4975#step:5:477
https://github.com/autowarefoundation/autoware/actions/runs/9892642537/job/27325823707?pr=4975#step:5:477

Effects on system behavior

Not applicable.

Interface changes

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Yutaka Kondo <[email protected]>
@youtalk youtalk changed the title feat(ci): update GitHub Actions cache only on the main branch feat(ci): save GitHub Actions cache only on the main branch Jul 11, 2024
@youtalk youtalk self-assigned this Jul 11, 2024
@youtalk youtalk added type:ci Continuous Integration (CI) processes and testing. tag:run-health-check Run health-check labels Jul 11, 2024
@youtalk youtalk requested review from xmfcx and mitsudome-r July 11, 2024 13:48
@youtalk youtalk marked this pull request as ready for review July 11, 2024 13:58
@youtalk youtalk requested a review from oguzkaganozt as a code owner July 11, 2024 13:58
@youtalk youtalk enabled auto-merge (squash) July 12, 2024 00:05
@youtalk
Copy link
Member Author

youtalk commented Jul 12, 2024

@xmfcx @oguzkaganozt @mitsudome-r Thank you for the discussion on the multi-containerization yesterday. Here is the PR for the first step. Please review it.

youtalk added a commit to youtalk/autoware that referenced this pull request Jul 12, 2024
@youtalk youtalk merged commit a8a3270 into main Jul 12, 2024
29 of 30 checks passed
@youtalk youtalk deleted the save-cache-on-main-only branch July 12, 2024 09:22
pravinkmr26 pushed a commit to pravinkmr26/autoware that referenced this pull request Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag:run-health-check Run health-check type:ci Continuous Integration (CI) processes and testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants