GitLab Triggers

RWX can trigger runs based on GitLab events. Before configuring triggers, ensure you've followed the getting started with GitLab guide.

For generic trigger options like title, target, if, and start, see Event Triggers.

Push Triggers

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

on:
  gitlab:
    push:

For detailed documentation including event fields, see GitLab Push Trigger Reference.

Merge Request Triggers

Placing the following snippet at the top of an RWX file will result in all tasks in the file running any time a GitLab merge request is opened, updated, or merged.

on:
  gitlab:
    merge-request:

For detailed documentation including event fields and available actions, see GitLab Merge Request Trigger Reference.

Tag Push Triggers

GitLab tag push events occur when tags are created or updated. This is useful for running tasks when releases are created.

on:
  gitlab:
    tag-push:

For detailed documentation including event fields, see GitLab Tag Push Trigger Reference.

Common Patterns

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

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

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

tasks:
  - key: code
    call: git/clone 2.0.3
    with:
      repository: [email protected]:YOUR_ORG/YOUR_REPO.git
      ref: ${{ init.commit-sha }}
      ssh-key: ${{ gitlab['YOUR_ORG/YOUR_REPO'].ssh-key }}

Reference Pages