Skip to content

Commit ce30ccb

Browse files
committed
fix ci
1 parent f7d143d commit ce30ccb

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/workflows/trivy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,29 @@ jobs:
2727
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
2828
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db
2929
steps:
30+
- name: Free Disk Space (Ubuntu)
31+
uses: jlumbroso/[email protected]
32+
with:
33+
# this might remove tools that are actually needed,
34+
# if set to "true" but frees about 6 GB
35+
tool-cache: false
36+
# all of these default to true, but feel free to set to
37+
# "false" if necessary for your workflow
38+
android: true
39+
dotnet: true
40+
haskell: true
41+
large-packages: true
42+
docker-images: true
43+
swap-storage: true
44+
45+
# the runner machine has a disk /dev/sdb1 which mounted to /mnt, and it has more free disk than /dev/sda1.
46+
# we can use it to save docker's data to avoid bookie error due to lack of disk.
47+
- name: change docker data dir
48+
run: |
49+
sudo service docker stop
50+
echo '{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/actions_job", "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json
51+
sudo service docker start
52+
3053
- name: Checkout
3154
uses: actions/checkout@v3
3255
with:

.github/workflows/trivy_scheduled_master.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,28 @@ jobs:
3838
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
3939
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db
4040
steps:
41+
- name: Free Disk Space (Ubuntu)
42+
uses: jlumbroso/[email protected]
43+
with:
44+
# this might remove tools that are actually needed,
45+
# if set to "true" but frees about 6 GB
46+
tool-cache: false
47+
# all of these default to true, but feel free to set to
48+
# "false" if necessary for your workflow
49+
android: true
50+
dotnet: true
51+
haskell: true
52+
large-packages: true
53+
docker-images: true
54+
swap-storage: true
55+
56+
# the runner machine has a disk /dev/sdb1 which mounted to /mnt, and it has more free disk than /dev/sda1.
57+
# we can use it to save docker's data to avoid bookie error due to lack of disk.
58+
- name: change docker data dir
59+
run: |
60+
sudo service docker stop
61+
echo '{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/actions_job", "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json
62+
sudo service docker start
4163
- name: Checkout
4264
uses: actions/checkout@v3
4365
with:

0 commit comments

Comments
 (0)