Skip to content

Commit

Permalink
feat: Support to pass github authentication token for github apis (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
godwingrs22 authored Apr 2, 2024
1 parent c6696d3 commit 3b5166e
Show file tree
Hide file tree
Showing 5 changed files with 855 additions and 257 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- uses: aws-actions/setup-sam@v2
with:
use-installer: true
token: ${{ secrets.GITHUB_TOKEN }}
- uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -63,6 +64,16 @@ The Python interpreter to use for AWS SAM CLI. Defaults to `python` on Windows,

You can use [`actions/setup-python`](https://github.com/actions/setup-python) to automatically set up Python.

### `token`

> **Note**
>
> It is recommended to use token to have higher rate limit. Default [unauthenticated users](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#primary-rate-limit-for-unauthenticated-users) without a token will have a lesser rate limit enforced.

The GITHUB Authentication token to use for calling the GITHUB [Get the latest release](https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release) API. Defaults to call the API as unauthenticated request if not specified.

The parameter can accept either [`GITHUB_TOKEN`](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) or [`PAT(Personal Access Token)`](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) tokens.

## Security

See [CONTRIBUTING.md](CONTRIBUTING.md#security-disclosures) for more information.
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ inputs:
description: "Set to true to install using native installers instead of pip"
required: false
default: false
token:
description: "Authentication token to be used to call GITHUB Apis"
required: false
runs:
using: "node20"
main: "dist/index.js"
Loading

0 comments on commit 3b5166e

Please sign in to comment.