A composite action that creates a commit status in the repository.
Requires the statuses: write permission to work.
| Name | Description | Default |
|---|---|---|
state (*) |
The state of the status. Can be one of: error, failure, pending, or success. |
N/A |
context |
A string label to differentiate this status from the status of other systems. This field is case-insensitive. Default: default | "default" |
description |
A short description of the status. | "" |
github-token |
The default token to use for this Git operation. If unspecified, this will default to github.token. |
"${{ github.token }}" |
owner |
The repository owner. If unspecified, this will default to the owner of the current repository. | "" |
repo |
The name of the repository. If unspecified, this will default to the current repository. | "" |
retries |
The number of times to attempt to retry if this fails. | "0" |
retry-exempt-status-codes |
A list of error-codes that are exempt from being retried. | "400,401,403,404,422" |
sha |
The SHA to create a status for. If unspecified, defaults to the SHA of the current event. | "${{ github.sha }}" |
target-url |
The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: http://ci.example.com/user/repo/build/sha | "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" |
Note: (*) marks required inputs
repos/create-commit-status does not have any outputs at this time
Here is a very basic example of how to use the repos/create-commit-status composite action
in a project (placeholders are used in place of real inputs):
run:
example-job:
# ...
steps:
# ...
- name: Create commit status
uses: bitwizeshift/actions-github/repos/create-commit-status@v1
with:
# Required inputs
state: STATE
# Optional inputs
context: CONTEXT
description: DESCRIPTION
github-token: GITHUB_TOKEN
owner: OWNER
repo: REPO
retries: RETRIES
retry-exempt-status-codes: RETRY_EXEMPT_STATUS_CODES
sha: SHA
target-url: TARGET_URL