mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-02 23:37:18 +08:00
Merge branch 'main' of https://github.com/actions/virtual-environments into v-malob/xcode
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/add-network-interface-detection.sh
|
||||
# Distributed by MIT license, license can be found at the bottom of this script
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/autologin.sh
|
||||
# Distributed by MIT license, license can be found at the bottom of this script
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# Add script for changing hostname to run on startup to prevent duplicate hostnames across the environment. Hostname and Computername should contain .local in name to avoid name resolution issues
|
||||
tee -a /usr/local/bin/change_hostname.sh > /dev/null <<\EOF
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
name="Mac-$(python -c 'from time import time; print int(round(time() * 1000))')"
|
||||
scutil --set HostName "${name}.local"
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Enable firewall. SSH and VNC opened. Can't did it at bootstrap step, so placed it here
|
||||
defaults write /Library/Preferences/com.apple.alf globalstate -int 1
|
||||
|
||||
# Setting correct time zone
|
||||
echo "Configuring system time to GMT..."
|
||||
rm -f /etc/localtime
|
||||
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo "Enabling safari driver..."
|
||||
# https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
[[ ! -d ~/.ssh ]] && mkdir ~/.ssh 2>/dev/null
|
||||
chmod 777 ~/.ssh
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# Disabling automatic updates
|
||||
sudo softwareupdate --schedule off
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Close all finder windows because they can interfere with UI tests
|
||||
osascript -e 'tell application "Finder" to close windows'
|
||||
|
||||
# Ignore available updates to prevent system pop-ups
|
||||
updateName=$(softwareupdate -l | grep "Title: " | awk -F[:,] '{print $2}' | awk '{$1=$1};1')
|
||||
if [ ! -z "$updateName" ]; then
|
||||
sudo softwareupdate --ignore "$updateName"
|
||||
if is_Less_BigSur; then
|
||||
# Ignore available updates to prevent system pop-ups
|
||||
updateName=$(softwareupdate -l | grep "Title: " | awk -F[:,] '{print $2}' | awk '{$1=$1};1') || true
|
||||
if [ ! -z "$updateName" ]; then
|
||||
sudo softwareupdate --ignore "$updateName"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Put documentation to $HOME root
|
||||
cp $HOME/image-generation/output/software-report/systeminfo.txt $HOME/image-generation/output/software-report/systeminfo.md $HOME/
|
||||
|
||||
# Put build vm assets scripts to proper directory
|
||||
mkdir -p /usr/local/opt/$USER/scripts
|
||||
mv $HOME/image-generation/assets/* /usr/local/opt/$USER/scripts
|
||||
|
||||
find /usr/local/opt/$USER/scripts -type f -name "*\.sh" -exec chmod +x {} \;
|
||||
|
||||
# Clean up npm cache which collected during image-generation
|
||||
# we have to do that here because `npm install` is run in a few different places during image-generation
|
||||
npm cache clean --force
|
||||
|
||||
# Clean yarn cache
|
||||
yarn cache clean
|
||||
|
||||
# Clean up temporary directories
|
||||
rm -rf ~/utils ~/image-generation
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
Launch_Daemons="/Library/LaunchDaemons"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo Additional NTP servers adding into /etc/ntp.conf file...
|
||||
cat > /etc/ntp.conf << EOF
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
imagedata_file="$HOME/imagedata.json"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# set screensaver idleTime to 0, to prevent turning screensaver on
|
||||
macUUID=`ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c27-62`
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo "Changing shell to bash"
|
||||
sudo chsh -s /bin/bash $USERNAME
|
||||
sudo chsh -s /bin/bash root
|
||||
Reference in New Issue
Block a user