Publish GHA evidence items

2 minute read

Use the publish-evidence-item action to capture job-level evidence data in Markdown format in a GHA workflow run and publish it to CloudBees Unify. Evidence is displayed on the Evidence tab of Run details. This action is available on the GitHub Marketplace.

This action also supports system property references, such as ${{ cloudbees.run_id }} or ${{ vars.api_endpoint }}.

Inputs

Table 1. Input details
Input name Data type Required? Description

content

String

Yes

The content to publish as evidence.

cloudbees-url

String

No

The CloudBees Unify URL. The default value is https://api.cloudbees.io.

The required markup language format for the evidence content is Markdown.

Usage example

The following is a basic example of using the action:

steps: - name: Publish evidence uses: cloudbees-io-gha/publish-evidence-item@v2 with: content: |- # Sample Markdown evidence output - Application endpoint: https://app.example.com/qa - Artifacts - [backend.jar](https://example.com/repo/app/v1.0/backend.jar)

Markdown syntax support

The content input accepts Markdown-formatted text. For more information, refer to the Markdown documentation.

Table 2. Markdown syntax support and examples
Markdown syntax Supported? Example Rendered output

Bulleted list

-item1
-item2

  • item1

  • item2

Character codes

©
|

© |

Code

```
jobs:
  build:
    steps:
    - Compile
```

jobs: build: steps: - Compile

External content

![CBP workflow build video](https://bit.ly/3RagSnN)

Formatting

**bold text**
_italics_

bold text
italics

Headings

# Heading
## Subheading

Heading

Subheading

HTML/Color

Hyperlink

[backend.tar](https://ourcompany.com/repo/backend.tar)

Line break

Quoted text (Blockquotes)

> A block quote of text such as this example.
>
> Anonymous

A block quote of text such as this example.
— Anonymous

Table

Test | Results |
--------|---------|
Test 1 | PASS |
Test 2 | FAIL |
Test 3 | PASS |