Skip to content

CI

CI #10

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/github-script@v6
id: check
with:
result-encoding: string
script: |
const result = await github.request('POST /repos/{owner}/{repo}/check-runs', {
owner: context.repo.owner,
repo: context.repo.repo,
name: 'mighty_readme',
head_sha: '${{ github.sha }}',
status: 'in_progress',
// external_id: '42',
// started_at: '2018-05-04T01:14:52Z',
// output: {
// title: 'Mighty Readme report',
// summary: '',
// text: ''
// },
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
})
return result.data.id;
- run: echo "${{ steps.check.outputs.result }}"
- uses: actions/github-script@v6
with:
script: |
const result = await github.request('PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}', {
owner: context.repo.owner,
repo: context.repo.repo,
check_run_id: '${{ steps.check.outputs.result }}'
name: 'mighty_readme',
head_sha: '${{ github.sha }}',
conclusion: '${{ job.status }}',
// external_id: '42',
// started_at: '2018-05-04T01:14:52Z',
// output: {
// title: 'Mighty Readme report',
// summary: '',
// text: ''
// },
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
})