Set status #1205
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://dev.to/doctolib/github-actions-how-to-push-a-github-status-in-addition-of-github-checks-3d27 | |
name: Set status | |
on: | |
workflow_run: | |
workflows: ["Test ext", "Test chart build"] | |
types: | |
- completed | |
jobs: | |
set_status: | |
runs-on: ubuntu-latest | |
permissions: | |
statuses: write | |
steps: | |
- name: Create status | |
run: | | |
curl --request POST \ | |
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.workflow_run.head_commit.id }} \ | |
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | |
--header 'content-type: application/json' \ | |
--data '{ | |
"state": "${{ github.event.workflow_run.conclusion }}", | |
"context": "${{ github.event.workflow_run.name }}", | |
"target_url": "${{ github.event.workflow_run.html_url }}" | |
}' \ | |
--fail | |
if: ${{ github.event.workflow_run.conclusion != 'skipped' }} |