mirror of
https://github.com/actions/runner-images.git
synced 2026-01-06 18:19:54 +08:00
[macos] cleanup Homebrew cache after image generation (#8182)
This commit is contained in:
7
images/macos/provision/configuration/cleanup-brew.sh
Normal file
7
images/macos/provision/configuration/cleanup-brew.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash -e -o pipefail
|
||||||
|
###########################################################################
|
||||||
|
# The script removes local Homebrew cache
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
rm -rf "$(brew --cache)"
|
||||||
@@ -246,6 +246,7 @@ build {
|
|||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
scripts = [
|
scripts = [
|
||||||
"./provision/configuration/configure-hostname.sh",
|
"./provision/configuration/configure-hostname.sh",
|
||||||
|
"./provision/configuration/cleanup-brew.sh",
|
||||||
"./provision/configuration/finalize-vm.sh"
|
"./provision/configuration/finalize-vm.sh"
|
||||||
]
|
]
|
||||||
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
|
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user