Skip to content

Set status

Set status #1054

Workflow file for this run

# 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' }}