mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-31 01:24:35 +02:00
test(ci): test token usage for delivery action
This commit is contained in:
parent
13552496ba
commit
fa50ed353b
13
.github/actions/package-delivery/action.yml
vendored
13
.github/actions/package-delivery/action.yml
vendored
@ -22,6 +22,9 @@ inputs:
|
||||
artifactory_token:
|
||||
description: "token for artifactory"
|
||||
required: true
|
||||
github_token:
|
||||
description: "token for github"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
@ -29,11 +32,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 | jq .rate
|
||||
curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ github.token }}" https://api.github.com/rate_limit
|
||||
echo ""
|
||||
echo ""
|
||||
echo "anonymous rate usage:"
|
||||
curl -s -H "Accept: application/vnd.github+json" https://api.github.com/rate_limit | jq .rate
|
||||
curl -s -H "Accept: application/vnd.github+json" https://api.github.com/rate_limit
|
||||
echo ""
|
||||
echo ""
|
||||
shell: bash
|
||||
@ -41,7 +44,7 @@ runs:
|
||||
- name: Download packages from testing
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
github-token: ${{ inputs.github_token }}
|
||||
script: |
|
||||
const warningNoPromote = 'No packages are promoted because push is not related to a hotfix/release pull request.';
|
||||
const commitSha = context.sha;
|
||||
@ -53,11 +56,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 | jq .rate
|
||||
curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ github.token }}" https://api.github.com/rate_limit
|
||||
echo ""
|
||||
echo ""
|
||||
echo "anonymous rate usage:"
|
||||
curl -s -H "Accept: application/vnd.github+json" https://api.github.com/rate_limit | jq .rate
|
||||
curl -s -H "Accept: application/vnd.github+json" https://api.github.com/rate_limit
|
||||
echo ""
|
||||
echo ""
|
||||
shell: bash
|
||||
|
1
.github/workflows/connector-vmware.yml
vendored
1
.github/workflows/connector-vmware.yml
vendored
@ -47,3 +47,4 @@ jobs:
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
release_type: ${{ needs.get-environment.outputs.release_type }}
|
||||
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user