Skip to content

Latest commit

 

History

History
134 lines (88 loc) · 8.42 KB

File metadata and controls

134 lines (88 loc) · 8.42 KB

Icon GitHub Action: Deployment - Get workflow failure

Deployment - Get workflow failure

Marketplace Release License Stars PRs Welcome GitHub Verified Creator

Overview

Inspect the current workflow run and return any failed jobs.

This action calls the GitHub Actions API to list all jobs for the workflow run that triggered the current workflow (using context.runId). It filters jobs with terminal failure conclusions (for example failure and timed_out) and exposes a JSON list of the failed jobs together with a boolean flag indicating whether any job failed. Each failed job entry contains the job name, its conclusion, and the job web URL for quick access.

Note: this action reads jobs for the current run and therefore relies on the workflow run context; the default GITHUB_TOKEN already has read access to Actions in typical workflows.

It requires the actions: read permission on the token used.

Usage

- uses: hoverkraft-tech/ci-github-publish/actions/workflow/get-workflow-failure@84d583ba7b357f9476707f54cf5419d630ae0145 # 0.26.2
  with:
    # GitHub Token to get workflow information.
    # Permissions:
    # - actions: read
    # See https://docs.github.com/en/rest/actions/workflows#list-jobs-for-a-workflow-run.
    #
    # Default: `${{ github.token }}`
    github-token: ${{ github.token }}

Inputs

Input Description Required Default
github-token GitHub Token to get workflow information. false ${{ github.token }}
Permissions:
- actions: read
See https://docs.github.com/en/rest/actions/workflows#list-jobs-for-a-workflow-run.

Outputs

Output Description
failed-jobs JSON array (string) of failed job objects. Each object contains:
- name: job name
- conclusion: job conclusion (e.g. failure, timed_out)
- html_url: link to the job run in GitHub UI
Example:
[
 { "name": "build", "conclusion": "failure", "html_url": "https://..." }
]
has-failed Boolean (string) value: true if at least one job failed, otherwise false.

Contributing

Contributions are welcome! Please see the contributing guidelines for more details.

License

This project is licensed under the MIT License.

SPDX-License-Identifier: MIT

Copyright © 2026 hoverkraft

For more details, see the license.


This documentation was automatically generated by CI Dokumentor.