feat: use GITHUB_TOKEN if available in Serverless-Init .NET install script#748
Merged
Merged
Conversation
duncanpharvey
marked this pull request as ready for review
July 18, 2025 16:54
duncanista
approved these changes
Jul 18, 2025
|
@duncanpharvey Amazing, thank you! Would you be able to ping me when the docker image is updated? We're now passing down the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_TOKENto be passed as a Docker secret to the .NET install script to allow for an increased rate limit. If noGITHUB_TOKENis passed then requests will be unauthenticated as they were before this change.Motivation
#734
Additional Notes
GITHUB_TOKENenvironment variable is set. If it is, pass it in theAuthorizationheader withBearerstatus_codeattribute to the response json and print it for troubleshootingjqto parse the response jsonGithub token provided -> success
No Github token provided -> success
No Github token provided -> rate limited
Usage
github-tokensecret into theGITHUB_TOKENenvironment variable so it can be passed in the authentication header of the Github API request.GITHUB_TOKENenvironment variable to the Docker secretgithub-token.Relevant documentation to update following this change: