Skip to content

Outputs Action

Publish DAG or remote action outputs without parsing stdout in the caller.

Use action: outputs.write when a workflow needs to return a small structured result assembled from literals, parameters, or previous step outputs:

yaml
steps:
  - id: publish_result
    action: outputs.write
    with:
      values:
        messageId: msg-123
        status: sent

The values are added to the run outputs and are available to downstream steps as:

yaml
${publish_result.outputs.messageId}
${publish_result.outputs.status}

When the step is inside a remote action DAG, the parent workflow reads those fields from the action step:

yaml
steps:
  - id: notify
    action: acme/dagu-action-notify@v1.2.0
    with:
      text: "Deploy finished"

  - id: audit
    depends: [notify]
    run: echo "Message: ${notify.outputs.messageId}"

Configuration

FieldTypeRequiredDescription
valuesobjectyesOutput fields to publish. Must contain at least one key.

Values should be small JSON-compatible values. Use Artifacts for files, reports, logs, screenshots, or large JSON payloads.

outputs.write does not validate a remote action manifest by itself. When the step runs inside a remote action DAG, Dagu validates the final collected action output object against the outputs schema in dagu-action.yaml after the action DAG returns.

Stdout Outputs

If a command already writes the boundary result to stdout, use stdout.outputs instead of adding a separate outputs.write step:

yaml
steps:
  - id: notify
    run: ./notify.sh
    stdout:
      outputs:
        decode: json

Use fields to publish only selected values:

yaml
steps:
  - id: notify
    run: ./notify.sh
    stdout:
      outputs:
        fields:
          messageId:
            decode: json
            select: .id

Released under the MIT License.