feat: use GITHUB_TOKEN if available in Serverless-Init .NET install script #748
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the .NET install script for Serverless-Init makes unauthenticated requests to the Github API, sometimes resulting in rate limiting. This PR adds a
GITHUB_TOKEN
to be passed as a Docker secret to the .NET install script to allow for an increased rate limit. If noGITHUB_TOKEN
is passed then requests will be unauthenticated as they were before this change.Motivation
#734
Additional Notes
GITHUB_TOKEN
environment variable is set. If it is, pass it in theAuthorization
header withBearer
status_code
attribute to the response json and print it for troubleshootingjq
to parse the response jsonGithub token provided -> success
No Github token provided -> success
No Github token provided -> rate limited
Usage
github-token
secret into theGITHUB_TOKEN
environment variable so it can be passed in the authentication header of the Github API request.GITHUB_TOKEN
environment variable to the Docker secretgithub-token
.Relevant documentation to update following this change: