Skip to content

Set test status

Set test status #11

Workflow file for this run

# Adds the results of a workflow as a commit status
name: Set test status
on:
workflow_run:
workflows: ["build"]
types:
- completed
jobs:
set_status:
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Create status
run: |
gh api repos/${{ github.repository }}/statuses/${{ github.event.workflow_run.head_commit.id }} \
-f "state"="${{ github.event.workflow_run.conclusion }}" \
-f "context"="${{ github.event.workflow_run.event }}.${{ github.event.workflow_run.id}}"\
-f "target_url"="${{ github.event.workflow_run.html_url }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}