https://github.com/guibranco/github-status-action-v2
https://github.com/marketplace/actions/github-status-action-v2
Adds a status update to a commit. GitHub will always show the latest state of a context.
authToken
(required)
Use secrets.GITHUB_TOKEN or your own token if you need to trigger other workflows that use "on: status"'state
(required)
The status of the check should only besuccess
,error
,failure
orpending
context
The context, this is displayed as the name of the checkdescription
Short text explaining the status of the checkowner
Repostory onwer, defaults to context github.repository_owner if omitedrepository
Repository, default to context github.repository if omitedsha
SHA of commit to update status on, defaults to context github.sha
If usingon: pull_request
usegithub.event.pull_request.head.sha
target_url
Url to use for the details link. If omited no link is shown.
None.
name: "test"
on: # run on any PRs and main branch changes
pull_request:
push:
branches:
- master
jobs:
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run the action # You would run your tests before this using the output to set state/desc
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'Test run'
description: 'Passed'
state: 'success'
sha: ${{github.event.pull_request.head.sha || github.sha}}