Releases: SonarSource/gh-action_cache
v1.3.0
New Features
Added new composite action for self-service S3 cache cleanup: SonarSource/gh-action_cache/cleanup
It supports:
- List mode — discover all cache entries for your repo without deleting anything
- Delete by branch — remove all cache entries for a specific branch (e.g.,
feature/my-branch) - Delete by key — remove entries matching a cache key prefix across all branches or specific branch (e.g.,
sccache-Linux) - Dry-run — preview what would be deleted before committing
- GitHub Actions job summary — collapsible table of matched/deleted objects in the workflow summary
Setup
Add a workflow_dispatch workflow to your repository and trigger it from the default branch.
See Cache Cleanup in the README for full setup instructions and usage examples.
NOTE: Due to security constrains you cannot run cache cleanup from non-default branch!
v1.2.3
What's Changed
New Features
- BUILD-10389 support CACHE_BACKEND env var for backend selection by @julien-carsique-sonarsource in #40
Full Changelog: v1.2.2...v1.2.3
v1.2.2
What's Changed
- BUILD-10450 Use full refs for helper actions to avoid pre-commit issues by @mikolaj-matuszny-ext-sonarsource in #39
Full Changelog: v1.2.1...v1.2.2
v1.2.1
What's Changed
- fix: ~/.aws/credentials file fallback for nested composite action bug by @mikolaj-matuszny-ext-sonarsource in #37
Full Changelog: v1.2.0...v1.2.1
v1.2.0
What's Changed
- PREQ-3880 Bulletproof S3 cache auth with JS credential guard by @mikolaj-matuszny-ext-sonarsource in #36
Full Changelog: v1.1.4...v1.2.0
v1.1.4
BREAKING CHANGE
This release introduces a bug in unknown race conditions: see BUILD-10339
Could not load credentials from any providers
Prefer using v1.1.3 unless v1.1.4 is not failing in your case and resolving the save post step.
What's Changed
- PREQ-3880 AWS credentials refactor by @mikolaj-matuszny-ext-sonarsource in #32
Full Changelog: v1.1.3...v1.1.4
v1.1.3
What's Changed
- BUILD-9976 Move AWS credentials to named profile by @mikolaj-matuszny-ext-sonarsource in #30
Full Changelog: v1.1.2...v1.1.3
v1.1.2
What's Changed
- Revert "BUILD-9956 fix post run aws auth" by @julien-carsique-sonarsource in #29
This release is breaking the Post Run cache save, in order to preserve the AWS environment.
Full Changelog: v1.1.1...v1.1.2
v1.1.1
What's Changed
Bug Fixes
- BUILD-9956 fix post run aws auth by @julien-carsique-sonarsource in #28
Workaround: backup the credentials after calling the action, set the other credentials, do some work..., restore the gh-action_cache credentials as the last step
- uses: SonarSource/gh-action_cache@v1
- name: Backup Credentials
shell: bash
run: |
{
echo "BAK_AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID"
echo "BAK_AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY"
echo "BAK_AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN"
} >> "$GITHUB_ENV"
- uses: aws-actions/configure-aws-credentials@... # custom usage
...
- name: Restore Credentials # restore gh-action_cache in the last step
shell: bash
run: |
{
echo "AWS_ACCESS_KEY_ID=$BAK_AWS_ACCESS_KEY_ID"
echo "AWS_SECRET_ACCESS_KEY=$BAK_AWS_SECRET_ACCESS_KEY"
echo "AWS_SESSION_TOKEN=$BAK_AWS_SESSION_TOKEN"
} >> "$GITHUB_ENV"
Full Changelog: v1.1.0...v1.1.1
v1.1.0
What's Changed
New Features
- BUILD-9795 New input
fallback-branchfor additional cache fallback branch by @mikolaj-matuszny-ext-sonarsource in #25 - BUILD-9956 import code from ci-github-actions/cache by @julien-carsique-sonarsource in #27 : ci-github-actions/cache is now deprecated and gh-action_cache manages the redirection to actions/cache or runs-on/cache depending on the repository visibility.
Improvements
- BUILD-9795 Add guardrails for default branch cache fallback by @mikolaj-matuszny-ext-sonarsource in #24
- BUILD-9795 Add workflow dispatch option by @mikolaj-matuszny-ext-sonarsource in #26
Full Changelog: v1.0.5...v1.1.0