Tutorial

New updates and improvements to Roundfleet.

Important notice

The code examples and scripts provided in these tutorials are for educational purposes only. Roundfleet is not responsible for any issues, damages, or security vulnerabilities that may arise from the use, modification, or implementation of these examples. Always review and test code in a secure environment before using it in production systems.

Configuring a GitHub Actions Runner on a Mac Mini (Apple Silicon)

GitHub Actions runner

GitHub Actions is a powerful CI/CD platform that allows you to automate your software development workflows. While GitHub offers hosted runners, self-hosted runners provide increased control and customization for your CI/CD setup. This tutorial guides you through setting up, configuring, and connecting a self-hosted runner on a Mac Mini to execute macOS pipelines.

Prerequisites

Before you begin, ensure you have:

  • A Mac Mini (register on Roundfleet)
  • A GitHub repository with administrator rights
  • A package manager installed (preferably Homebrew)
  • Git installed on your system

Step 1: Create a Dedicated User Account

First, create a dedicated user account for the GitHub Actions runner:

# Create the 'gh-runner' user account
sudo dscl . -create /Users/gh-runner
sudo dscl . -create /Users/gh-runner UserShell /bin/bash
sudo dscl . -create /Users/gh-runner RealName "GitHub runner"
sudo dscl . -create /Users/gh-runner UniqueID "1001"
sudo dscl . -create /Users/gh-runner PrimaryGroupID 20
sudo dscl . -create /Users/gh-runner NFSHomeDirectory /Users/gh-runner

# Set the password for the user
sudo dscl . -passwd /Users/gh-runner your_password

# Add 'gh-runner' to the 'admin' group
sudo dscl . -append /Groups/admin GroupMembership gh-runner

Switch to the new user account:

su gh-runner

Step 2: Install Required Software

Install Git and Rosetta 2 (if using Apple Silicon):

# Install Git if not already installed
brew install git

# Install Rosetta 2 for Apple Silicon Macs
softwareupdate --install-rosetta

Step 3: Configure the GitHub Actions Runner

  1. Go to your GitHub repository
  2. Navigate to Settings > Actions > Runners

GitHub Actions runner

  1. Click "New self-hosted runner" (https://github.com/<username>/<repository>/settings/actions/runners/new)
  2. Select macOS as the runner image and ARM64 as the architecture
  3. Follow the provided commands to download and configure the runner

GitHub Actions runner

Create a .env file in the runner's _work directory:

# _work/.env file
ImageOS=macos15
XCODE_15_DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
  1. Execute the run.sh script in your runner directory to complete the setup.
  2. Verify that the runner is up and listening for jobs in the terminal and check the GitHub repository settings for the runner's association and Idle status.

GitHub Actions runner

Step 4: Configure Sudoers (Optional)

If your actions require root privileges, configure the sudoers file:

sudo visudo

Add the following line:

gh-runner ALL=(ALL) NOPASSWD: ALL

Step 5: Using the Runner in Workflows

Configure your GitHub Actions workflow to use the self-hosted runner:

name: Sample workflow

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: [self-hosted, macOS, ARM64]
    steps:
      - name: Install NodeJS
        run: brew install node

The runner is authenticated to your repository and labeled with self-hosted, macOS, and ARM64. Use it in your workflows by specifying these labels in the runs-on field:

runs-on: [self-hosted, macOS, ARM64]

Best Practices

  • Keep your runner software up to date
  • Regularly monitor runner logs for issues
  • Use specific labels for different types of runners
  • Implement proper security measures
  • Consider using multiple runners for load balancing

Troubleshooting

Common issues and solutions:

  1. Runner not connecting:

    • Check network connectivity
    • Verify GitHub token validity
    • Ensure proper permissions
  2. Build failures:

    • Check Xcode installation
    • Verify required dependencies
    • Review workflow logs
  3. Permission issues:

    • Verify user permissions
    • Check sudoers configuration
    • Review file system permissions

Conclusion

You now have a self-hosted GitHub Actions runner configured on your Mac Mini. This setup provides you with more control over your CI/CD environment and allows you to run macOS-specific workflows efficiently.

Remember to regularly maintain your runner and keep it updated with the latest security patches and software versions.

Related Tutorials

Rosetta 2 and Apple Silicon Compatibility Management on macOS

Learn how to install, manage, and monitor Rosetta 2 translation layer on Apple Silicon Macs with enterprise-grade compatibility management, application monitoring, and fleet-wide deployment capabilities.

Jul 7, 2025

Manage Kernel Extensions on macOS

Learn how to display, load, unload, and monitor kernel extensions (kexts) on macOS devices using command-line scripts for enhanced system management and security.

Jul 7, 2025

Disk Image Management on macOS

Learn how to create, manage, and deploy disk images from folders on macOS devices using hdiutil for enterprise data packaging, distribution, and system deployment workflows.

Jul 7, 2025

Chrome Extension Management and Security on macOS

Learn how to discover, analyze, and manage Google Chrome extensions on macOS devices, implement security policies, and monitor browser extension compliance for enterprise security.

Jul 7, 2025

Native App

Roundfleet is a native app for Mac, Windows and Linux.

May 14, 2025

Wi-Fi Network Management on macOS

Manage Wi-Fi networks, configure proxy settings, DNS servers, and implement enterprise network policies on macOS devices using advanced networksetup commands and centralized fleet management.

Jul 7, 2025

User Creation Management on macOS

Comprehensive guide for enterprise user provisioning and lifecycle management on Roundfleet devices with automated workflows, security controls, and standardized user creation processes.

Jul 7, 2025

User Account Management on macOS

Learn how to create, manage, and configure user accounts on macOS devices using command-line tools. Comprehensive guide for admin and standard user creation, password policies, and enterprise user management.

Jul 7, 2025