-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.28 KB
/
cache-cleanup-pull-request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
# Docs: https://github.com/OpenGrabeso/clean-cache
#
# As we are using caches more and more, we are getting over the GitHubs 10 GB limit.
# Unfortunately GitHub does does not have very smart cache eviction policy
# Docs: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
#
# Each pre-compiled coreboot toolchain takes up around 500 MB.
# The most space at the time of writing is taken up by coreboot toolchains. At the time of writing we
# have 7 coreboot versions, each for x86 and arm64, resulting in 7*2*500=7 GB.
# Thankfully the coreboot toolchains are not re-built that often, but they do take almost 1 hour to build - hence
# caching is a good idea.
# To make sure that the toolchains remain available as long as possible, we should start manually cleaning up the
# cache - making the eviction logic smarter.
name: cache cleanup pull request
on:
pull_request:
types:
- closed
permissions:
actions: write
contents: read
pull-requests: read
jobs:
cache-cleanup-pr:
runs-on: ubuntu-latest
steps:
- name: Clean cache for the closed/merged PR
uses: opengrabeso/clean-cache@v1
continue-on-error: true
with:
keep: 1