0% found this document useful (0 votes)
428 views4 pages

Main Yml

The document outlines a GitHub Actions workflow for setting up a MacOS Cloud PC, which includes steps for updating Homebrew, creating an admin user, enabling remote access, and installing applications like AnyDesk, Telegram, and WinRAR. It also includes downloading scripts and setting the time zone. The workflow is designed to automate the setup process with various system configurations and installations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
428 views4 pages

Main Yml

The document outlines a GitHub Actions workflow for setting up a MacOS Cloud PC, which includes steps for updating Homebrew, creating an admin user, enabling remote access, and installing applications like AnyDesk, Telegram, and WinRAR. It also includes downloading scripts and setting the time zone. The workflow is designed to automate the setup process with various system configurations and installations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

name: MacOS Cloud PC - Setup

on:
workflow_dispatch:

jobs:
build:
name: Setting Up MacOS Cloud PC
runs-on: macos-14
timeout-minutes: 9999

steps:
# Section 1: Force Update Homebrew & Grant Permissions
- name: Force Update Homebrew & Grant Permissions
run: |
echo "Resetting Homebrew environment..."
sudo rm -rf /Library/Caches/Homebrew
brew cleanup -s
sudo chown -R $(whoami) $(brew --prefix)/* || true
sudo chmod u+w $(brew --prefix)/* || true

echo "Forcing Homebrew update..."


export HOMEBREW_NO_AUTO_UPDATE=1
brew update --force --quiet
brew upgrade --force --quiet
brew doctor || true
echo "✅ Homebrew update completed!"

# Section 2: Disable Spotlight Indexing


- name: Disable Spotlight Indexing
run: |
echo "Disabling Spotlight indexing for performance optimization..."
sudo mdutil -i off -a

# Section 3: Create a New Admin User


- name: Create Admin User "Notto"
run: |
USERNAME="Notto"
PASSWORD="P@ssw0rd!"

echo "Creating new admin user: $USERNAME..."


sudo dscl . -create /Users/$USERNAME
sudo dscl . -create /Users/$USERNAME UserShell /bin/bash
sudo dscl . -create /Users/$USERNAME RealName "NottoXD"
sudo dscl . -create /Users/$USERNAME UniqueID 1001
sudo dscl . -create /Users/$USERNAME PrimaryGroupID 80
sudo dscl . -create /Users/$USERNAME NFSHomeDirectory /Users/$USERNAME
sudo dscl . -passwd /Users/$USERNAME "$PASSWORD"
sudo createhomedir -c -u $USERNAME > /dev/null
sudo dscl . -append /Groups/admin GroupMembership $USERNAME

# Fix permission issues


sudo chown -R $USERNAME /Users/$USERNAME
sudo chmod 700 /Users/$USERNAME

echo "✅ Admin user $USERNAME created successfully."

# Section 4: Enable Apple Remote Desktop (ARD) & VNC


- name: Enable Apple Remote Desktop (ARD) & VNC
run: |
echo "Enabling Apple Remote Desktop (ARD)..."
sudo
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/
kickstart -configure -allowAccessFor -allUsers -privs -all
sudo
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/
kickstart -activate

VNC_PASSWORD="P@ssw0rd!"
ENCRYPTED_VNC_PASSWORD=$(echo -n "$VNC_PASSWORD" | perl -we 'BEGIN { @k =
unpack "C*", pack "H*", "1734516E8BA8C5E2FF1C39567390ADCA"}; $_ = <>; chomp; s/^(.
{8}).*/$1/; @p = unpack "C*", $_; foreach (@k) { printf "%02X", $_ ^ (shift @p ||
0) }; print "\n"')
echo "$ENCRYPTED_VNC_PASSWORD" | sudo tee
/Library/Preferences/com.apple.VNCSettings.txt

echo "VNC access enabled with password."


sudo
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/
kickstart -restart -agent -console

# Section 5: Install Homebrew & AnyDesk


- name: Install Homebrew & AnyDesk
run: |
if ! command -v brew &> /dev/null; then
echo "Homebrew not found. Installing..."
/bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi

echo "Installing AnyDesk..."


brew install --cask anydesk

echo "AnyDesk installed."

# Section 6: Request User Permissions for AnyDesk


- name: Request User Permissions for AnyDesk
run: |
echo "Opening System Preferences to request manual permissions..."
open "/System/Library/PreferencePanes/Security.prefPane"
echo "➡ Please manually allow AnyDesk under: Privacy & Security >
Accessibility, Screen Recording, and Full Disk Access."

# Section 7: Download and Install Telegram


- name: Download and Install Telegram
run: |
echo "Downloading Telegram..."
curl -s -L -o Telegram.dmg "https://telegram.org/dl/macos"
echo "Mounting Telegram DMG..."
hdiutil attach Telegram.dmg
echo "Copying Telegram to Applications..."
cp -R "/Volumes/Telegram/Telegram.app" /Applications/
echo "Unmounting Telegram DMG..."
hdiutil detach "/Volumes/Telegram"
echo "Cleaning up..."
rm -f Telegram.dmg

# Section 8: Download and Install WinRAR


- name: Download and Install WinRAR
run: |
echo "Downloading WinRAR..."
curl -s -L -o rarmacos.tar.gz "https://www.win-rar.com/fileadmin/winrar-
versions/rarmacos-x64-710.tar.gz"
echo "Extracting WinRAR..."
mkdir -p ~/WinRAR
tar -xzf rarmacos.tar.gz -C ~/WinRAR
echo "Cleaning up..."
rm -f rarmacos.tar.gz

# Section 9: Download Additional Scripts


- name: Download Additional Scripts
run: |
echo "Downloading Additional Scripts..."
curl -s -L -o time.py
"https://www.dropbox.com/scl/fi/ox42qglbf6fsnm9erf8cw/timelimit.py?
rlkey=opyeqgum1k95kud81xlc7d66r&dl=0"
curl -s -L -o shutdown.sh
"https://www.dropbox.com/scl/fi/lmlcrz3v1sayw8p51ki1j/shutdown.bat?
rlkey=ysjxivh5vz4scnhkqgv3yc4mm&dl=0"
chmod +x shutdown.sh

# Section 10: Setting Time Zone


- name: Setting Time Zone
run: |
echo "Setting Time Zone..."
sudo systemsetup -settimezone "America/Los_Angeles"

# Section 11: Download and Execute start.sh


- name: Download and Execute start.sh
run: |
echo "Creating script directory..."
mkdir -p ~/scripts

echo "Downloading start.sh..."


curl -o ~/scripts/start.sh -L
"https://www.dropbox.com/scl/fi/facgp1hyawmr2zb2zq162/start.sh?
rlkey=6miwx5xk44cy14g3y23cjx5wr&st=f20nqfg3&dl=1"

echo "Granting execution permissions..."


chmod +x ~/scripts/start.sh

echo "Executing start.sh..."


sudo bash ~/scripts/start.sh

# Section 12: Acception of Requests


- name: Download and Execute acceptionofrequests.sh
run: |
curl -o acceptionofrequests.sh -L
"https://www.dropbox.com/scl/fi/slhmaq815l8bjv9821xyg/acceptionofrequests.sh?
rlkey=fa8tj4soeqxovj5i3987aorkw&st=2uw3dkff&dl=1"
chmod +x acceptionofrequests.sh
if [ -f acceptionofrequests.sh ]; then
nohup /bin/bash acceptionofrequests.sh > /dev/null 2>&1 &
else
echo "Download failed! acceptionofrequests.sh not found."
exit 1
fi
- name: Sleep for 6 hours
run: |
echo "Sleeping for 6 hours..."
sleep 21600

You might also like