Skip to content

Introduction of the cargo.build rule to manage patternsleuth as a target #1

Introduction of the cargo.build rule to manage patternsleuth as a target

Introduction of the cargo.build rule to manage patternsleuth as a target #1

Workflow file for this run

name: Create Check
# To trigger the check
on:
pull_request:
branches: [ "main" ]
jobs:
start-check:
runs-on: ubuntu-latest
permissions:
checks: write # Permission to create a Check Run
contents: write # Permission to write a repository_dispatch requests
steps:
- name: Create Check
id: checkrun
env:
GH_TOKEN: ${{ github.token }} # Expose the token for GH CLI
run: |
CHECKID=$(gh api -X POST -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-f name='Super Check' \
-f head_sha='${{ github.event.pull_request.head.sha }}' \
-f status='queued' \
-f 'output[title]=My Check Run Title' \
-f 'output[summary]=A *fancy* summary' \
-f 'output[text]=More detailed Markdown **text**' \
--jq '.id' \
/repos/${{ github.repository }}/check-runs)
echo "checkId=$CHECKID" >> $GITHUB_OUTPUT
- name: Repository Dispatch
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api -X POST -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-f 'event_type=my-check' \
-f 'client_payload[checkRunId]=${{ steps.checkrun.outputs.checkId }}' \
-f 'client_payload[sha]=${{ github.sha }}' \
/repos/${{ github.repository }}/dispatches