Docs · GitHub Actions

GitHub Actions on NoMac

Your GitHub Actions jobs on a fresh Mac with Xcode: change runs-on to nomac.

Connect GitHub

Sign in at nomac.app, open CI and press Connect GitHub. It installs the NoMac CI app on your account or organization, on every repository or the ones you pick. You need some credit.

Change one line

.github/workflows/ci.yml
jobs:
  test:
    runs-on: nomac
    steps:
      - uses: actions/checkout@v5
      - name: Build and test
        run: |
          set -o pipefail
          xcodebuild test -scheme App -destination \
            'platform=iOS Simulator,name=iPhone 17 Pro,OS=27.2' \
            | xcbeautify

Each job gets its own Mac. Keep set -o pipefail when you pipe into xcbeautify: GitHub's default shell has no pipefail, so a failed test would otherwise pass. The CI page lists every job with its minutes and cost.

What you get

The machine
A fresh macOS VM for every job, deleted when the job ends: 6 cores and 8 GB of an Apple silicon Mac (M4 to M6).
Installed
macOS 26.6.2, Xcode 27.2, iOS 27.2 Simulator; Node 24.20.0, npm 11.19.0, Ruby 3.4.11, Bundler 4.0.24, CocoaPods 1.17.0, xcbeautify 3.2.1, XcodeGen 2.46.0, Git 2.54.0, Git LFS 3.8.0, GitHub CLI 2.100.0, jq 1.7.1, Python 3.14.7, uv 0.13.0, simulator-use 0.15.3, nvm 0.40.8, Swift 6.4.2, Homebrew 7.0.12.
Price
1.5¢ a minute ($0.90 an hour) from your NoMac credit, billed per minute from the Mac's start to its stop, a minute at least. No subscription. A Mac that ran no job is credited back.
Jobs at once
2 per account, GitHub and GitLab jobs together; a job waits in GitHub's queue for a free one. Ask for more.
Longest job
6 hours, as on GitHub's own runners.
Out of credit
Jobs wait in GitHub's queue and start once you buy credit (GitHub cancels a job queued for 24 hours).

Build incrementally: nomac-cache

Set runs-on to nomac-cache and the job gets its repository's build cache, a 20 GB disk kept between jobs. It holds the checkout, DerivedData, the tool cache of setup actions, and the Swift package, CocoaPods, Carthage, Homebrew, npm, Yarn and pnpm caches. Checkout then fetches only new commits, and Xcode rebuilds only what they changed.

.github/workflows/ci.yml
jobs:
  test:
    runs-on: nomac-cache
  • Who updates it. Only a job that passed, in a run of a push, a schedule or a manual dispatch on the repository's default branch. Every other job starts from the cache and its changes are thrown away: a pull request, another branch, a failed or cancelled job.
  • Forks never read it. A job from a fork gets a Mac without the cache. GitHub can still hand it a Mac started for another job; then it stops at Set up runner, with no log, before its first step. Re-run it. In a public repository, give pull requests from forks a clean Mac: runs-on: ${{ github.event.pull_request && github.event.pull_request.head.repo.full_name != github.repository && 'nomac' || 'nomac-cache' }}.
  • Clean Macs stay clean. A runs-on: nomac job never gets a cache, so keep release and TestFlight builds there. Use nomac-cache alone: [nomac, nomac-cache] asks for a runner with both, which NoMac never has.
  • One Mac at a time. A second job asking for the cache while one runs starts without it and saves nothing. A job that has the cache sees NOMAC_BUILD_CACHE=1.
  • What a job leaves there, later jobs read. Never write secrets into the checkout or DerivedData.
  • Build folders in the checkout. actions/checkout deletes every file git does not track, ignored ones too: Pods, node_modules, .build and a -derivedDataPath inside the checkout start empty each job. Give it clean: false to keep them, and leave DerivedData at Xcode's default path.
  • Space and reset. DerivedData of other Xcode versions is removed when a job starts, and with less than 8 GB free the cache is emptied first and the job builds from scratch. On the CI page you can see each repository's cache and reset it. A cache no job used for 30 days is deleted.

Sign and send to TestFlight

With the App Store add-on, a release workflow signs and sends to TestFlight with NoMac's steps, and no Apple secret is stored in GitHub: NoMac keeps the App Store Connect key and makes the profiles.

Terminal
permissions:
  id-token: write
  contents: read
jobs:
  release:
    runs-on: nomac
    steps:
      - uses: actions/checkout@v5
      - uses: NoMac-app/actions/sign@v1
      - run: |
          xcodebuild archive -scheme App -configuration Release -destination 'generic/platform=iOS' -archivePath build/App.xcarchive -xcconfig "$NOMAC_XCCONFIG"
          xcodebuild -exportArchive -archivePath build/App.xcarchive -exportPath build/export -exportOptionsPlist "$NOMAC_EXPORT_OPTIONS"
      - uses: NoMac-app/actions/testflight@v1
        with:
          ipa: build/export/App.ipa
  • Off until you allow it. On the CI page, under Signing from jobs, make the CI certificate (one of your team's distribution certificates, with a key of its own), then allow a repository's workflow file with the bundle IDs it may sign.
  • Only that workflow, on the default branch. Tags sign too if you allow them. A pull request, another branch, a reusable workflow it calls or a fork never signs, and only a job on a NoMac Mac does.
  • What the job's Mac gets. The CI certificate and the profiles of the allowed bundle IDs, in a keychain of its own, for that job: none of your other secrets. Every step of an allowed job can read it, so allow only workflows you trust; if its key ever leaks, revoke the CI certificate at Apple and your Macs keep signing with theirs.
  • TestFlight waits until Apple has the build. The app needs its App Store Connect record, and its export compliance answered once (ITSAppUsesNonExemptEncryption in its Info.plist).

Submit for App Review

The same workflow can then submit the build for App Review. The job runs in a GitHub environment, and the publish step names the build: its bundle ID, version and build number.

Terminal
jobs:
  release:
    runs-on: nomac
    environment: app-store
    steps:
      # checkout, sign, archive and export as above
      - uses: NoMac-app/actions/testflight@v1
        id: testflight
        with:
          ipa: build/export/App.ipa
      - uses: NoMac-app/actions/publish@v1
        with:
          bundle-id: ${{ steps.testflight.outputs.bundle-id }}
          version: ${{ steps.testflight.outputs.version }}
          build: ${{ steps.testflight.outputs.build-number }}
  • Off until you turn it on. Allow the workflow with an environment (the one its job uses), then turn on Submit for App Review beside it on the CI page. Only a person can, there; allowing the workflow again turns it off.
  • A reviewer other than the person who pushed approves each run. In GitHub (Settings, Environments), give the environment a required reviewer and turn on Prevent self-review. NoMac reads both when you turn the switch on and at each submission, and refuses an environment without them; limiting its branches and tags is not enough. GitHub offers required reviewers for public repositories on every plan, and for private repositories only on GitHub Enterprise.
  • What a job may do at Apple. Submit the build it names, of a bundle ID you allowed, once Apple has processed it, with that version alone in the submission. Never a release, a price, availability, a certificate or a capability, and never past a blocking App Store check. Only a version set to be released by hand (Manually release this version, in App Store Connect), so once Apple approves it waits for you; a version NoMac makes is set so.
  • Seen. Each submission is listed on the CI page and in the account's audit log, the first from a workflow is emailed to the account's owner, and a repository's jobs submit at most 5 builds a day. The step waits up to 30 minutes for Apple to process the build (wait-minutes); the Mac's minutes count meanwhile.

Debug a failed job on a Mac

A failed job on the CI page has Debug on a Mac: the commands for your terminal, and a prompt for your agent, that reproduce it on a NoMac Mac with a shell. A fresh copy of the repository at the job's commit goes to a clean Mac with the same macOS, Xcode and tools; you run the failing step there, fix it, and push one commit.

Terminal
git clone https://github.com/you/app.git app-1a2b3c4 && cd app-1a2b3c4 &&
  git fetch origin <commit> && git checkout -q --detach <commit> &&
  nomac start --drive none && nomac sync . && nomac ssh

One chain: if the clone fails, no Mac starts.

  • From the repository, never the CI Mac. Only the repository and the commit go to the Mac: not the job's build cache, files or GitHub secrets. Add a secret a step needs on Secrets. If a nomac-cache job passes on the clean Mac, its cache is the likely cause: reset it on the CI page.
  • Not a fork's code. A job whose code comes from a fork (or a GitLab merge request's, which may) is not set up on a Mac of your account, which has your secrets and signing certificate. A pull request's job built it merged into its base branch; the commit is the pull request's own, so merge the base branch in if it passes alone.
  • Git. nomac sync leaves .git on your computer; a build that reads it (a build number from git rev-list) needs a !.git line in .nomacignore.
  • For agents. With a NoMac API key, GET /api/v1/ci/jobs?state=failed lists failed jobs (add repository=owner/name), and GET /api/v1/ci/jobs/ID answers with debug: the commands, the prompt and start_mac's body.

Secrets and safety

A CI Mac runs only the job: it gets the job's secrets from GitHub, and none of your NoMac secrets or drives; signing reaches it only through the sign step of a workflow you allowed. Nothing else reaches it, including your NoMac API keys, and it is deleted when the job ends. A nomac-cache job also gets its repository's build cache, never any other drive, and a job that signed never updates the cache.

GitLab and any other CI

On GitLab.com, whole GitLab CI jobs run on NoMac Macs too, through a runner you connect: see GitLab CI. From Bitbucket Pipelines, CircleCI, Azure Pipelines, Jenkins, Buildkite, a self-managed GitLab or a script, nomac run runs one command on a fresh Mac of its own: see Any CI with nomac run.