Skip to content

Commit

Permalink
test(ci): test token usage for delivery action
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret committed Dec 5, 2024
1 parent c00b004 commit c708e45
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/actions/package-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@ 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

- 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;
Expand All @@ -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

0 comments on commit c708e45

Please sign in to comment.