Skip to content

Set linter status

Set linter status #9

Workflow file for this run

name: Set linter status
on:
workflow_run:
workflows: ["ESLint"]
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": "Linter for commit ${{ github.event.workflow_run.head_commit.id }}",
"target_url": "${{ github.event.workflow_run.html_url }}"
}' \
--fail