Adds a GitHub commit status to a repository for a specific commit.
repository: The full repository name to set the commit status on in the form of{owner}/{repo}sha: The commit SHA that status is to be registered against, defaults to the${{ github.sha }}value which is based off the event that triggered the workflowcontext: The string label for the commit status to differntiate from other statusesstate: The state of the commit status, must be one oferror,failure,pending,success, defaults tosuccessdescription: An optional description for the status, maximum140characterstarget_url: An optional URL for the commit status to be able to direct users to more details for the statustoken: The GitHub token to use to set the commit status, defaults to the Actions workflow tokengithub_api_url: An optional URL to the REST API for the GitHub instance you are accessing. Defaults to the actions environment value
Add a commit status recording unit tests passing for the current workflow:
- name: Add commit status
uses: octodemo-resources/github-commit-status@v1
with:
context: unit_test_results
state: success
description: Tests passed
target_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}