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

create new cache key on each run when saving previous commit hash #3898

Merged
merged 2 commits into from
May 7, 2024

Conversation

haileyok
Copy link
Contributor

@haileyok haileyok commented May 7, 2024

So, it turns out that actions/checkout@v4 does not overwrite cache keys. This was revealed after fixing a boolean check last night. Now, TestFlight releases are using a bad previous commit hash which is always triggering a new build now.

Instead, let's save to a new key on every run. We'll pull from the cache using the last-successful-deployment-commit-{branch}- prefix to find the old one instead of just a static string.

Production builds were running appropriately because they do not pull from the cache but rather use version-specific tag for a base commit, so this only affects internal builds.

This also lets us actually use the cancel-in-progress correctly, since the cache will actually be properly updated.

Copy link

render bot commented May 7, 2024

Copy link

github-actions bot commented May 7, 2024

Old size New size Diff
6.88 MB 6.88 MB 0 B (0.00%)

@haileyok haileyok merged commit 0658dd0 into main May 7, 2024
6 checks passed
@haileyok haileyok deleted the hailey/fix-cache-action branch May 7, 2024 20:08
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