Skip to content

clearwind-ca/send-result

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

A GitHub Action to easily send the result of a health check to the Service Catalog server. This works in conjunction with Get Payload

Usage

With inputs:

    - uses: clearwind-ca/send-result@inputs
      env:
        SERVICE_CATALOG_TOKEN: ${{ secrets.SERVICE_CATALOG_TOKEN }}
      with:
        result: "fail"
        message: "this didn't work out i'm afraid"

With a file written at the default location.

    - uses: clearwind-ca/send-payload@v1
      env:
        SERVICE_CATALOG_TOKEN: ${{ secrets.SERVICE_CATALOG_TOKEN }}

Required secrets

This secret must exist so that it can authenticate with the Service Catalog.

Name Required Value
SERVICE_CATALOG_TOKEN Yes A valid API token for your Service Catalog server

Inputs

Name Required Default Value
result_file No /tmp/service-catalog-result.json Path to the result file
payload_file No /tmp/service-catalog-payload.json The payload from the repository dispatch, as created by Get Payload

If payload_file and result_file are not specified, then they will use the defaults above.

The payload_file is the result of using get-payload and will place the payload in the correct place for this Action to consume.

If the payload_file is not specified and the default file is not present then it will use the input from the repository_dispatch event, if the repository_dispatch event payload exists.

If the result_file is not specified and the default file is not present then it will use the following inputs will be used.

Name Required Default Value
result No The result to send to the service catalog, pass or fail
message No Text to explain the reason for the failure in more detail

Example file:

{"result": "pass", "message": "This health check passed perfectly, well done."}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published