-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
31 lines (28 loc) · 892 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Mark Check Status
description: Marks a check status for a given PR
inputs:
status:
description: 'The status to set'
required: true
default: 'pending'
pr-head-sha:
description: 'The SHA of the head of the PR'
github-token:
description: 'The GitHub token to use'
required: true
job-name:
description: 'The name of the job'
required: true
runs:
using: composite
steps:
- name: Set Check Status
shell: bash
env:
GH_TOKEN: ${{ inputs.github-token }}
run: |
gh api repos/${{ github.repository }}/statuses/${{ inputs.pr-head-sha }} \
-f state=${{ inputs.status }} \
-f target_url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} \
-f context="${{ inputs.job-name }}" \
-f description="${{ inputs.job-name }}: ${{ inputs.status }}"