Zekt Action inputs and outputs
zekt-dev-org/zekt-action@v3. The job must have permissions: id-token: write: the action signs in
to Zekt with GitHub OIDC and takes no secret or token.
The action’s source code, README, changelog and releases are public in zekt-dev-org/zekt-action on GitHub.
Inputs
Section titled “Inputs”No input is strictly required, but some are needed depending on what you do.
| Input | Default | Description |
|---|---|---|
event-type | — | The event type consumers listen for. Required to send a normal event. Not used with orchestrate: true, or when a service run started by an orchestration step reports its outputs. |
payload | {} | Must be JSON. The event’s payload, or, with orchestrate: true, the orchestration plan. |
shield | false | Encrypt the payload with Zekt Shield. Not for orchestration step outputs: see Step outputs and Shield. |
orchestrate | false | Submit an orchestration plan instead of sending an event. |
execution_mode | sequential | Orchestration only. The plan’s own execution_mode takes precedence. |
wait | false | Orchestration only. Wait for the orchestration to finish, checking every 30 seconds. Needs zekt-action 3.3.5 or later: see Minimum version for wait: true. |
wait-timeout-minutes | 300 | Orchestration with wait: true only, and ignored without it. Stop waiting after this many whole minutes (1 or more) and fail the step. Empty means the default. The orchestration itself is not cancelled. New in 3.3.3. |
mask-step-outputs | false | Orchestration with wait: true only. Mask every step output value in this job’s logs. Short values such as 1 are then masked wherever they appear in the log, so turn it on only when the outputs are sensitive. New in 3.7.1. |
zekt-api-url, orchestration-api-url | Built in (leave unset) | Leave these unset. From 3.5.0, a value you set is checked first: see the URL checks. |
Outputs
Section titled “Outputs”| Output | When set | Description |
|---|---|---|
status | When sending an event (not with orchestrate: true) | success when the call succeeded. |
event-id | When sending an event | The event’s ID: the same value consumers receive as zekt.correlationId. A run delivers one event, so every send in the same run returns the first send’s event-id. |
consumers-notified | When sending an event | Deprecated since zekt-action 3.3.3, and removed in its next major version. Always 0: Zekt doesn’t report how many consumers were notified. Don’t rely on it. |
execution_id | orchestrate: true | The orchestration’s ID. |
execution_status | orchestrate: true and wait: true | completed, failed, timed_out or cancelled. Not set when the wait stopped early (see Failures). |
step_outputs | orchestrate: true and wait: true | Every step’s outputs as one JSON object, { "<step_id>": { "<field>": value } }, exactly as the services reported them. Read it with fromJSON(). {} when no step reported outputs; left out, with a warning, above 900 KB. New in 3.7.1, and the recommended way to read outputs. |
step_<step_id>_outputs_<field> | orchestrate: true and wait: true | One output per step output field. An excluded step sets none. From 3.7.1, only for some field names: see Reading step outputs. |
step_<step_id>_status | orchestrate: true and wait: true | Each step’s final state, such as completed, excluded or failed. Set for every step. |
excluded_steps | orchestrate: true and wait: true | The number of excluded steps, 0 when none. |
step_<step_id>_status and excluded_steps are new in
zekt-action 3.3.0.
Reading step outputs
Section titled “Reading step outputs”From 3.7.1, read a step’s outputs from step_outputs, through env::
- env: SUBSCRIPTION_ID: ${{ fromJSON(steps.orch.outputs.step_outputs)['create-sub'].subscription_id }} run: echo "Subscription ID: $SUBSCRIPTION_ID"The per-field outputs step_<step_id>_outputs_<field> are still written, with these rules from
3.7.1:
- Field names. A field gets its own output only when its name is 1–128 characters of
a-z A-Z 0-9 _ - .. A field with a., such asx.y, is read with bracket syntax:steps.orch.outputs['step_a_outputs_x.y']. Any other field is only instep_outputs. - Collisions. If two step and field pairs would produce the same output name, neither is written.
- Reserved names. A field that would produce a name the action writes itself isn’t written:
step_<step_id>_status,execution_status,excluded_stepsandstep_outputs, andresumed_fromandattempt, which are reserved for future use. - Values. Objects and arrays are written as JSON. Before 3.7.1 they came through as
[object Object]or1,2, so services had to return scalar values.
Every case that leaves a field out writes a warning (see Log and job summary),
and the field is still in step_outputs.
Minimum version for wait: true
Section titled “Minimum version for wait: true”Orchestration with wait: true needs
zekt-action 3.3.5 or later.
There is no 3.3.2 release. @v3 resolves to the latest v3 release.
If you run orchestrations with wait: true on @v3.3.4 or earlier, upgrade. Those versions
sign in to Zekt once and reuse that sign-in for every status check. It lasts about five minutes, so
once an orchestration takes longer, the next status check is refused with HTTP 401 and the step
fails. The submission itself isn’t affected. The orchestration carries on in Zekt even though the
step failed. Re-running the workflow submits a new orchestration, so first check in
Management → Orchestrations whether the first one completed.
| Pin | What wait: true does |
|---|---|
@v3.0.0 to @v3.3.4 | Fails the step once the orchestration takes longer than about five minutes, with Failed to get orchestration status (HTTP 401). From 3.0.3 the message continues …: OIDC token validation failed: Token expired. There’s no job summary and no execution_status. |
@v2 or any v2.x | Nothing: v2 has no orchestrate or wait inputs and never submits an orchestration. |
These versions also have no limit of their own on the wait: 3.3.1 and older have no
wait-timeout-minutes and keep checking a state they don’t know, and 3.3.0 and older keep checking a
cancelled orchestration. The expired sign-in ends the wait first.
Move such pins to @v3, or to @v3.3.5 or later if you pin exact versions.
Log and job summary
Section titled “Log and job summary”With orchestrate: true and wait: true:
- The log has one line per excluded step, for example step ‘create-rg’ excluded by its condition or step ‘create-kv’ excluded because ‘create-rg’ was excluded by its condition.
- The job summary has a condition column when the plan uses conditions, and a status column after waiting.
- The log shows how long the step waits, for example Polling orchestration status for <id> (every 30s, for up to 300 minutes). The last check can come sooner than 30 seconds, so the wait ends on time.
- When the wait stops early (see Failures), the job summary has a Stopped Waiting row.
From 3.7.1, these warnings say why a step’s output isn’t written as its own output. The step
carries on, and the values are still in step_outputs:
| When | Warning |
|---|---|
A field name isn’t 1–128 characters of a-z A-Z 0-9 _ - . | Step ‘<step_id>’ reported the output field “<field>”, which is not 1-128 characters of a-z, A-Z, 0-9, _, - and ., so it is not written as its own output. Read it from the step_outputs output. A field name over 80 characters is cut short with …. |
| Two step and field pairs produce the same name | step ‘<a>’ field “<f1>” and step ‘<b>’ field “<f2>” would all be written as <name>, so it is written for none of them. Read them from the step_outputs output. |
| A field would take a name the action writes itself | Step ‘<step_id>’ field “<field>” would be written as <name>, a name this action writes itself, so it is not written. Read it from the step_outputs output. |
| A step’s outputs aren’t a JSON object | Step ‘<step_id>’ reported outputs that are not a JSON object, so no step_<step_id>_outputs_* output is written for it. Read them from the step_outputs output. |
step_outputs itself is too large | The step_outputs output would be <n> bytes, more than the 921600 this action writes (GitHub allows 1 MB of outputs per job), so it is not written. |
Failures
Section titled “Failures”-
Any refusal from Zekt fails the step with the server’s error message.
-
With
wait: true, an orchestration that fails, times out or is cancelled fails the step. Onlycompletedpasses; the action has no input to change that. To let the job carry on anyway, set GitHub’scontinue-on-erroron the step. -
With
wait: true, the step also fails, and stops waiting, when:- Zekt reports an orchestration state the action doesn’t know: Orchestration <id> reported status ‘<status>’, which this version of zekt-action does not know… Update to the latest v3 release.
wait-timeout-minutespasses (300 by default): Stopped waiting for orchestration <id> after <N> minutes (wait-timeout-minutes); its last status was ‘<status>’… The default stays below the 6-hour job limit of GitHub-hosted runners, so the step fails with a message and a job summary instead of GitHub stopping the job. A plan that needs longer can raise it; past 360 minutes that only helps on a self-hosted runner whose jobtimeout-minutesis raised too.
In both cases the job summary is still written,
execution_statusisn’t set, and the orchestration itself carries on in Zekt: only the wait ends. -
An invalid
wait-timeout-minutes(not a whole number of minutes, 1 or more, so30m,1.5and0are refused) fails the step before anything is submitted. -
With
shield: true, the step fails if no subscriber has uploaded a public key. Nothing is sent unencrypted. -
Advisory warnings about an orchestration plan appear as
::warning::annotations in the workflow log.
zekt-api-url and orchestration-api-url
Section titled “zekt-api-url and orchestration-api-url”The run’s sign-in token is sent to these addresses, so from
3.5.0 the action checks a value
you set before it calls anything. A trailing / is dropped. Otherwise, the step fails with one of
these, where <input> is the input’s name and <raw> the value you gave:
| The value | Message |
|---|---|
| Isn’t a URL | ”<input>” is not a URL (got “<raw>“) |
Uses http://, except for localhost, 127.0.0.1 and [::1] | ”<input>” must be an https:// URL (got “<raw>”). The run’s OIDC token is sent to it, and plain http exposes that token in transit. http:// is accepted only for localhost, 127.0.0.1 and [::1]. |
| Contains credentials | ”<input>” must not contain credentials (user:password@host) |
| Contains a query string or a fragment | ”<input>” must not contain a query string or a fragment (got “<raw>”) |
A value that passes but points at a host that isn’t Zekt’s still runs, with a warning: “<input>” points at <host>, which is not a Zekt host. This run’s OIDC token, valid for Zekt for about five minutes, is sent there. Remove the input to use Zekt’s default.
Step outputs and Shield
Section titled “Step outputs and Shield”Report orchestration step outputs in plaintext: leave shield unset. Shield doesn’t cover step
outputs. With shield: true, the action encrypts them for the Shield subscribers of the repository
it runs in, not for the repository that requested the step, so the requester gets an envelope it
can’t decrypt, and the outputs are unusable in later steps.
- zekt-action 3.3.3 and later warn when a run sets
shield: truewithoutevent-type: shield: true with no event-type: this run reports orchestration step outputs… It’s a::warning::annotation only. The run still reports the outputs and still succeeds. - 3.3.1 and older encrypt step outputs silently.
Encrypted events (with an event-type) and plaintext step outputs aren’t affected.
Verify a release
Section titled “Verify a release”Releases from 3.3.8 on carry a
build-provenance attestation for the two files a workflow runs: dist/index.js and action.yml.
3.3.7 and older have none.
To check a release, clone the repository, check out the release’s tag (for example v3.4.0), and
run:
gh attestation verify dist/index.js --repo zekt-dev-org/zekt-actiongh attestation verify action.yml --repo zekt-dev-org/zekt-action- You need GitHub CLI 2.49 or later.
- Exit code
0means the file is verified; anything else means it isn’t. In a script or CI job, a successful check prints nothing.
To report a vulnerability in the action, follow its security policy.
Modes at a glance
Section titled “Modes at a glance”| You want to | Use |
|---|---|
| Send an event with a payload | event-type + payload |
| Send an encrypted payload | event-type + payload + shield: true |
| Run several services in order | orchestrate: true + payload (the plan), optionally wait: true |
| Report outputs from a service run started by an orchestration step | payload only (no event-type, no shield), in the service’s workflow |