Skip to content

Commit e896974

Browse files
authored
Update request rate limit in Windows CI (#29)
Signed-off-by: RaulSanchez <raul@eprosima.com> Signed-off-by: RaulSanchez <raul@eprosima.com>
1 parent 1fd85e3 commit e896974

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,17 @@ jobs:
405405
- name: Get build eProsima dependencies Job Id
406406
shell: pwsh
407407
run: |
408-
$RUNS_URI = '${{ github.api_url }}/repos/${{ github.repository }}/actions/workflows/build_dependencies.yml/runs';
409-
((iwr $RUNS_URI).Content | ConvertFrom-Json).workflow_runs | ? status -eq 'completed' |
408+
$secret = ConvertTo-SecureString -String "${{ secrets.GITHUB_TOKEN }}" -AsPlainText
409+
$RUNS_URI = '${{ github.api_url }}/repos/${{ github.repository }}/actions/workflows/build_dependencies.yml/runs'
410+
411+
# Check available queries according with github policy
412+
"::group::Rate Limits with github action token"
413+
((Invoke-WebRequest -Authentication OAuth -Token $secret `
414+
-Uri https://api.github.com/users/octocat).Headers.GetEnumerator() |
415+
? Key -like "X-RateLimit*") | Out-Host
416+
"::endgroup::"
417+
418+
((Invoke-WebRequest -Authentication OAuth -Token $secret -Uri $RUNS_URI).Content | ConvertFrom-Json).workflow_runs | ? status -eq 'completed' |
410419
select -first 1 id | % { "fastdds_job_id=" + $_.id } | Out-File $env:GITHUB_ENV -Append
411420
412421
- name: Download eProsima dependencies

0 commit comments

Comments
 (0)