Skip to content
monitor

GitHub Action

Cancel on Screen Lock

v1 Latest version

Cancel on Screen Lock

monitor

Cancel on Screen Lock

Cancel workflow when macOS screen is locked

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Cancel on Screen Lock

uses: sparta-science/cancel-on-screen-lock@v1

Learn more about this action in sparta-science/cancel-on-screen-lock

Choose a version

Cancel workflow when Mac screen is locked

Useful to cancel workflow early (before checkout) when self-hosted macOS runner has screen locked.

- name: Cancel on Screen Lock
  uses: sparta-science/cancel-on-screen-lock@v1
  with:
    repo-token: ${{ github.token }}

Use with UI Tests

Xcode UI Tests are unable to interact with the macOS or iOS apps when screen is locked. This action helps to abort early without triggering a failure.