-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (25 loc) · 917 Bytes
/
pr-status.yml
File metadata and controls
33 lines (25 loc) · 917 Bytes
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
32
33
name: pr-status
on:
workflow_run:
workflows: ["tests"]
types:
- completed
permissions:
contents: read
statuses: write
jobs:
status:
if: ${{ github.event.workflow_run.event == 'pull_request' }}
name: Pull Request Status
runs-on: ubuntu-latest
steps:
- name: Issue status
shell: bash
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/Climdyn/LayerCake/statuses/${{ github.event.workflow_run.head_sha }} \
-d '{"state":"${{ github.event.workflow_run.conclusion }}","target_url":"https://github.com/Climdyn/LayerCake/commit/${{ github.event.workflow_run.head_sha }}","description":"LayerCake tests results","context":"PR-status"}'