Skip to content

my-check

my-check #8

Workflow file for this run

name: Repository Dispatch
on:
repository_dispatch:
types: [my-check]
jobs:
myEvent:
runs-on: ubuntu-latest
steps:
####################################################
# Update the status to show that the queued message
# was received and is being processed
####################################################
- name: Acknowledge Request
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api -X PATCH -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-f 'status=in_progress' \
-f 'output[title]=My Check Run Title 🤔' \
-f 'output[summary]=A *fancy* summary' \
-f 'output[images][][image_url]=https://www.kenmuse.com/favicon/apple-touch-icon.png' \
-f 'output[images][][caption]=Sample from kenmuse.com' \
-f 'output[images][][alt]=Logo for kenmuse.com' \
/repos/${{ github.repository }}/check-runs/${{ github.event.client_payload.checkRunId }}
####################################################
# Actually, we'll just sleep to simulate some work
####################################################
- name: Processing
run: sleep 10
#####################################################
# Send a final message to complete the run and
# provide any final updates. Doing this one in JSON
# to make it more readable. This approach can also
# be used to get total control over the serialized
# data types (for example, integers).
#####################################################
- name: Complete Check
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api -X PATCH -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-f 'status=success' \
-f 'details_url=status=success' \
-f 'output[title]=My Check Run Title 🚀' \
-f 'output[summary]=**Summary**: The run completed.' \
-f 'output[text]=Everything worked as expected. You should see a logo above.' \
/repos/${{ github.repository }}/check-runs/${{ github.event.client_payload.checkRunId }}