test(ci): test token usage for delivery action

This commit is contained in:
Kevin Duret 2024-12-05 17:03:03 +01:00
parent c00b0040c6
commit c708e45928

View File

@ -29,11 +29,11 @@ runs:
- name: Check workflow statuses and display token usage
run: |
echo "github token rate usage:"
curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ github.token }}" https://api.github.com/rate_limit
curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ github.token }}" https://api.github.com/rate_limit | jq .core
echo ""
echo ""
echo "anonymous rate usage:"
curl -s -H "Accept: application/vnd.github+json" https://api.github.com/rate_limit
curl -s -H "Accept: application/vnd.github+json" https://api.github.com/rate_limit | jq .core
echo ""
echo ""
shell: bash
@ -41,6 +41,7 @@ runs:
- name: Download packages from testing
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ github.token }}
script: |
const warningNoPromote = 'No packages are promoted because push is not related to a hotfix/release pull request.';
const commitSha = context.sha;
@ -52,11 +53,11 @@ runs:
- name: Check workflow statuses and display token usage
run: |
echo "github token rate usage:"
curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ github.token }}" https://api.github.com/rate_limit
curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ github.token }}" https://api.github.com/rate_limit | jq .core
echo ""
echo ""
echo "anonymous rate usage:"
curl -s -H "Accept: application/vnd.github+json" https://api.github.com/rate_limit
curl -s -H "Accept: application/vnd.github+json" https://api.github.com/rate_limit | jq .core
echo ""
echo ""
shell: bash