Cursor Origin push trigger

See Cursor Origin Triggers for an overview and Event Triggers for generic options like title, target, and if.

Placing the following snippet at the top of an RWX file will result in all tasks in the file running on every Cursor Origin push.

on:
  origin:
    push:

It's common to pass values from the event as init parameters into tasks.

on:
  origin:
    push:
      init:
        commit-sha: ${{ event.git.sha }}

base:
  image: ubuntu:24.04
  config: rwx/base 1.1.1

tasks:
  - key: code
    call: git/clone 2.0.8
    with:
      repository: https://origin.cursor.com/YOUR_ORG/YOUR_REPO.git
      ref: ${{ init.commit-sha }}
      github-token: ${{ origin.token }}

Event fields

The following values are available in the event context for Cursor Origin push triggers:

PathDescription
event.git.shaThe SHA of the commit that triggered the event.
event.git.refThe ref that was pushed (e.g., refs/heads/main).

For all values available in the event.origin context for Cursor Origin push triggers, see Cursor Origin's documentation on payload families.