v0.32.0 53e25a3

ci-events.md RawHistoryFolder

CI events

Event Workflow read from Runs on Trusted when the owner caused it and…
push pushed commit pushed ref pushed it
pull_request test merge commit refs/pull/<n>/merge pushed both head and base
pull_request_target default branch default branch tip pushed the default branch tip
workflow_dispatch chosen ref chosen ref moved that ref to its commit
schedule default branch default branch tip last moved the default branch
workflow_run default branch default branch tip inherits the triggering run, never more
create created ref created ref pushed it
delete default branch default branch tip pushed the default branch tip

ermite run list, run view and the Actions pages show the event of each run.

pull_request

A merge request is a pull request for workflows.

  • refs/pull/<n>/head follows the source branch. refs/pull/<n>/merge is a test merge with the target, while it merges cleanly. Both can be fetched, never pushed.
  • Activities: opened, synchronize (a push on the source branch), closed (merged true or false). Default: opened, synchronize, reopened.
  • branches filters the target; paths filters files changed between the merge base and the head.
  • A head that conflicts with the target makes no run.
  • Checks are on the head commit.

pull_request_target

Same activities, filters and payload as pull_request, but the workflow comes from the default branch and runs on it. A head that edits the workflow changes nothing. Runs even on conflict.

Stricter than GitHub: a merge request opened or pushed by an agent gets no secrets.

Its cache is read-only and restores only default-branch entries.

Warning: never build, test or install the head's code in a trusted pull_request_target run (checking out github.event.pull_request.head.sha and running it). That leaks secrets: a "pwn request". Use pull_request to build a request's code. See GitHub's Securely using pull_request_target.

workflow_dispatch

ermite workflow run <file> --repo <repo> [--ref <branch|tag>] [-f name=value …]
  • Needs ci:write. <file> is a path or a name under .github/workflows. --ref defaults to the default branch. A disabled workflow (ermite workflow disable) is refused with failed_precondition.
  • Inputs are checked against the workflow (required, boolean, number, choice, environment). Up to 25 inputs.
  • A branch-limited token can dispatch only on its branches, and never gets a trusted run.
  • A job can dispatch with its own token when its permissions: give actions: write.

schedule

  • cron (five fields) with an optional IANA timezone (UTC by default). An invalid name fails the push's run.
  • Read on the default branch only; runs on its latest commit.
  • Missed minutes (server down) are not made up. Several matching entries start one run.
  • DST: a skipped time runs at the next valid time; a repeated time runs once.

workflow_run

  • workflows: [<name>], types: requested | completed. branches filters the head branch of the triggering run.
  • Payload: workflow_run and workflow.
  • Chains stop after three levels.

create and delete

  • Start on a push that creates or deletes a branch or tag (also a merge with --delete-branch).
  • No filters; [skip ci] does not apply. A push of more than three tags starts none.
  • Payload: ref, ref_type, pusher_type, repository, sender; create adds master_branch and description.

Mirror events

Not workflow triggers: ermite watch reports them when a push mirror changes health, once per incident.

  • mirror.failed: the mirror started failing or was paused. Payload: repo, state (failing or paused), failure_class (diverged, auth_denied, remote_not_found, host_key, transient, internal). In ermite watch --json they are mirror_failed (with state, failure_class) and mirror_recovered.
  • mirror.recovered: a failing or paused mirror pushed successfully. Payload: repo.

The payload carries neither the remote URL, the reason nor the error detail; ermite mirror status shows the reason to repository admins.

source
1# CI events
2
3| Event | Workflow read from | Runs on | Trusted when the owner caused it and… |
4|---|---|---|---|
5| `push` | pushed commit | pushed ref | pushed it |
6| `pull_request` | test merge commit | `refs/pull/<n>/merge` | pushed both head and base |
7| `pull_request_target` | default branch | default branch tip | pushed the default branch tip |
8| `workflow_dispatch` | chosen ref | chosen ref | moved that ref to its commit |
9| `schedule` | default branch | default branch tip | last moved the default branch |
10| `workflow_run` | default branch | default branch tip | inherits the triggering run, never more |
11| `create` | created ref | created ref | pushed it |
12| `delete` | default branch | default branch tip | pushed the default branch tip |
13
14`ermite run list`, `run view` and the Actions pages show the event of each run.
15
16## `pull_request`
17
18A merge request is a pull request for workflows.
19
20- `refs/pull/<n>/head` follows the source branch. `refs/pull/<n>/merge` is a test merge with the target, while it merges cleanly. Both can be fetched, never pushed.
21- Activities: `opened`, `synchronize` (a push on the source branch), `closed` (`merged` true or false). Default: `opened`, `synchronize`, `reopened`.
22- `branches` filters the target; `paths` filters files changed between the merge base and the head.
23- A head that conflicts with the target makes no run.
24- Checks are on the head commit.
25
26## `pull_request_target`
27
28Same activities, filters and payload as `pull_request`, but the workflow comes from the **default branch** and runs on it. A head that edits the workflow changes nothing. Runs even on conflict.
29
30Stricter than GitHub: a merge request opened or pushed by an agent gets no secrets.
31
32Its cache is read-only and restores only default-branch entries.
33
34> **Warning:** never build, test or install the head's code in a trusted `pull_request_target` run (checking out `github.event.pull_request.head.sha` and running it). That leaks secrets: a "pwn request". Use `pull_request` to build a request's code. See GitHub's [Securely using pull_request_target](https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target).
35
36## `workflow_dispatch`
37
38```sh
39ermite workflow run <file> --repo <repo> [--ref <branch|tag>] [-f name=value …]
40```
41
42- Needs `ci:write`. `<file>` is a path or a name under `.github/workflows`. `--ref` defaults to the default branch. A disabled workflow (`ermite workflow disable`) is refused with `failed_precondition`.
43- Inputs are checked against the workflow (`required`, `boolean`, `number`, `choice`, `environment`). Up to 25 inputs.
44- A branch-limited token can dispatch only on its branches, and never gets a trusted run.
45- A job can dispatch with its own token when its `permissions:` give `actions: write`.
46
47## `schedule`
48
49- `cron` (five fields) with an optional IANA `timezone` (UTC by default). An invalid name fails the push's run.
50- Read on the default branch only; runs on its latest commit.
51- Missed minutes (server down) are not made up. Several matching entries start one run.
52- DST: a skipped time runs at the next valid time; a repeated time runs once.
53
54## `workflow_run`
55
56- `workflows: [<name>]`, `types: requested | completed`. `branches` filters the head branch of the triggering run.
57- Payload: `workflow_run` and `workflow`.
58- Chains stop after three levels.
59
60## `create` and `delete`
61
62- Start on a push that creates or deletes a branch or tag (also a merge with `--delete-branch`).
63- No filters; `[skip ci]` does not apply. A push of more than three tags starts none.
64- Payload: `ref`, `ref_type`, `pusher_type`, `repository`, `sender`; `create` adds `master_branch` and `description`.
65
66## Mirror events
67
68Not workflow triggers: `ermite watch` reports them when a [push mirror](mirror.md) changes health, once per incident.
69
70- `mirror.failed`: the mirror started failing or was paused. Payload: `repo`, `state` (`failing` or `paused`), `failure_class` (`diverged`, `auth_denied`, `remote_not_found`, `host_key`, `transient`, `internal`). In `ermite watch --json` they are `mirror_failed` (with `state`, `failure_class`) and `mirror_recovered`.
71- `mirror.recovered`: a failing or paused mirror pushed successfully. Payload: `repo`.
72
73The payload carries neither the remote URL, the reason nor the error detail; `ermite mirror status` shows the reason to repository admins.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 42

↑↓ moveenter openesc close