Skip to content

Commit fa9ef29

Browse files
authored
delete CodeQL from hosted tool cache at start of PR, Push, and Release actions (#283)
1 parent 264d5c5 commit fa9ef29

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.github/workflows/pr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ jobs:
2424
- name: Check sizes of directories in tools cache
2525
run: du -sh /opt/hostedtoolcache/* | sort -h
2626

27+
# A recent run of du -sh /opt/hostedtoolcache/* | sort -h yielded:
28+
# 24K /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
29+
# 217M /opt/hostedtoolcache/Ruby
30+
# 520M /opt/hostedtoolcache/PyPy
31+
# 574M /opt/hostedtoolcache/node
32+
# 1.1G /opt/hostedtoolcache/go
33+
# 1.7G /opt/hostedtoolcache/CodeQL
34+
# 1.9G /opt/hostedtoolcache/Python
35+
# Since we are just building a Docker container we delete some unused
36+
# pre-installed tools to make space.
37+
- name: Free up disk space by deleting /opt/hostedtoolcache/CodeQL
38+
run: rm -rf /opt/hostedtoolcache/CodeQL
39+
2740
# Login against a Docker registry
2841
# https://github.com/docker/login-action
2942
- name: Log into registry

.github/workflows/push.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ jobs:
1717
packages: write
1818

1919
steps:
20+
# A recent run of du -sh /opt/hostedtoolcache/* | sort -h yielded:
21+
# 24K /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
22+
# 217M /opt/hostedtoolcache/Ruby
23+
# 520M /opt/hostedtoolcache/PyPy
24+
# 574M /opt/hostedtoolcache/node
25+
# 1.1G /opt/hostedtoolcache/go
26+
# 1.7G /opt/hostedtoolcache/CodeQL
27+
# 1.9G /opt/hostedtoolcache/Python
28+
# Since we are just building a Docker container we delete some unused
29+
# pre-installed tools to make space.
30+
- name: Free up disk space by deleting /opt/hostedtoolcache/CodeQL
31+
run: rm -rf /opt/hostedtoolcache/CodeQL
32+
2033
# Login against a Docker registry
2134
# https://github.com/docker/login-action
2235
- name: Log into registry

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ jobs:
1717
packages: write
1818

1919
steps:
20+
# A recent run of du -sh /opt/hostedtoolcache/* | sort -h yielded:
21+
# 24K /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
22+
# 217M /opt/hostedtoolcache/Ruby
23+
# 520M /opt/hostedtoolcache/PyPy
24+
# 574M /opt/hostedtoolcache/node
25+
# 1.1G /opt/hostedtoolcache/go
26+
# 1.7G /opt/hostedtoolcache/CodeQL
27+
# 1.9G /opt/hostedtoolcache/Python
28+
# Since we are just building a Docker container we delete some unused
29+
# pre-installed tools to make space.
30+
- name: Free up disk space by deleting /opt/hostedtoolcache/CodeQL
31+
run: rm -rf /opt/hostedtoolcache/CodeQL
32+
2033
# Login against a Docker registry
2134
# https://github.com/docker/login-action
2235
- name: Log into registry

0 commit comments

Comments
 (0)