Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
fail-on-error: true
```

Finally, steps that have not been marked with a conclusion can be finalized to a specifed conclusion. This ensures there will be no checks defined upfront stuck in a non-final state when the job ends.
Finally, steps that have not been marked with a conclusion can be finalized to a specified conclusion. This ensures there will be no checks defined upfront stuck in a non-final state when the job ends.

```yml
jobs:
Expand All @@ -145,6 +145,34 @@ jobs:
conclusion: cancelled
```

### Additional check information

When a check is created or updated additional information may be provided as supported by the GitHub Checks feature.

```yml
jobs:
build:
steps:
- name: Report PHPUnit Conclusion
if: always()
uses: dflydev/check-runs-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: phpunit
conclusion: ${{ steps.phpunit.outcome }}
fail-on-error: true
output: |
{
"title": "title visible on both Conversation and Checks tabs",
"summary": "markdown supporting field shown on the Checks tab",
"text_description": "another markdown supporting field shown on the Checks tab"
}
```

Mapping of the properties provided in the `output` object to the Checks `output` is as follows:
- `title` is mapped from `title` if provided falling back to `name`,
- `summary` is mapped from `summary`,
- `text` is mapped from `text_description`

## Author

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ const Inputs = __importStar(__webpack_require__(615));
const unpackInputs = (inputs) => {
const output = inputs.output
? {
output: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (inputs.name ? { title: inputs.name } : {})), (inputs.output.summary ? { summary: inputs.output.summary } : {})), (inputs.output.text_description
output: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (inputs.name ? { title: inputs.name } : {})), (inputs.output.title ? { title: inputs.output.title } : {})), (inputs.output.summary ? { summary: inputs.output.summary } : {})), (inputs.output.text_description
? { text: inputs.output.text_description }
: {})), (inputs.actions ? { actions: inputs.actions } : {})), (inputs.images ? { images: inputs.images } : {})),
}
Expand Down
1 change: 1 addition & 0 deletions src/checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const unpackInputs = (inputs: Inputs.CheckRun): object => {
? {
output: {
...(inputs.name ? {title: inputs.name} : {}),
...(inputs.output.title ? {title: inputs.output.title} : {}),
...(inputs.output.summary ? {summary: inputs.output.summary} : {}),
...(inputs.output.text_description
? {text: inputs.output.text_description}
Expand Down
1 change: 1 addition & 0 deletions src/namespaces/Inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export type Images = Octokit.ChecksCreateParamsOutputImages[]
export type Actions = Octokit.ChecksCreateParamsActions[]

export interface Output {
title?: string
summary: string
text_description?: string
}
Expand Down