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

cache clean workflow #598

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

alan-forbes-cp
Copy link
Collaborator

@alan-forbes-cp alan-forbes-cp commented Nov 22, 2024

Overview

Workflow to automatically clean caches by schedule (with manual option).

Reason for change

Cache housekeeping (size limit exists).

Description of change

Cache clean workflow rationale:

  • uses gh command line tool functionality
  • runs on ubuntu-latest
  • needs GH_TOKEN & 'action: write' perms (for gh actions-cache delete)
  • schedules cache clean every night @ 23:00hrs
  • workflow dispatch is also included - with dryrun option (default "true")
  • cleans cache for all items contained in cache prefix list.
  • cleans main branch only
  • retains latest cached item for each listed prefix
  • produces before/during/after logging

Anything else we should know?

Note that caching in CodeQL has been disabled (trap-caching: false added in workflow) as closer inspection of this feature has unearthed an apparent bug (a single cache item name being used for multiple jobs in the CodeQL workflow causing "cache already exists" warnings) together with support's recent suggestion that the feature be disabled due to other caching issues.

Some code has been added for testing purposes and will be removed in the final version - see comments.

@alan-forbes-cp alan-forbes-cp changed the title DRAFT: cache clean DRAFT: cache clean workflow Nov 25, 2024
@alan-forbes-cp alan-forbes-cp changed the title DRAFT: cache clean workflow cache clean workflow Nov 25, 2024
@alan-forbes-cp alan-forbes-cp marked this pull request as ready for review November 25, 2024 11:23
@alan-forbes-cp alan-forbes-cp requested a review from a team as a code owner November 25, 2024 11:23
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