Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

38 lines (31 sloc) 1.16 KB
name: Test
on:
push:
jobs:
TEST:
name: Test
runs-on: windows-latest
env:
MY_PAT: ${{ secrets.MY_PAT }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check run_id and run_number
run: |
echo "run_id = ${{ github.run_id }}"
echo "run_number = ${{ github.run_number }}"
- name: List check runs
run: |
$runId = ${{ github.run_id }}
$pat = $env:MY_PAT
$uri = "https://api.github.com/repos/BrightRan/TestClock/check-suites/$runId/check-runs"
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f "", $pat)))
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", ("Basic {0}" -f $base64AuthInfo))
$headers.Add("Accept", "application/vnd.github.antiope-preview+json")
$headers.Add("Content-Type", "application/json")
$response = Invoke-RestMethod -Uri $uri -Headers $headers -Method GET
$response | ConvertTo-Json
- name: Failed run
run: |
faru
You can’t perform that action at this time.