diff --git a/README.md b/README.md index ebbc5bb..a492fef 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ For more advanced usage, see the following examples: | `version` | WASI SDK version to install (e.g., `25`) | No | `latest` | | `install-path` | Directory to install WASI SDK to | No | `$RUNNER_TOOL_CACHE/wasi-sdk` | | `add-to-path` | Add WASI SDK `bin` directory to the `PATH` | No | `true` | +| `github-token` | GitHub token for API requests | No | `${{ github.token }}` | Note that passing `latest` as the `version` will attempt to retrieve the latest [release tag][releases]. See GitHub's [variables reference] for a description of `RUNNER_TOOL_CACHE`; other diff --git a/action.yml b/action.yml index 5b839ba..9c29b68 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,10 @@ inputs: description: 'Add WASI SDK bin directory to PATH' required: false default: 'true' + github-token: + description: 'GitHub token for API requests (avoids rate limiting)' + required: false + default: ${{ github.token }} outputs: wasi-sdk-path: @@ -35,6 +39,8 @@ runs: - name: Install WASI SDK id: install shell: bash + env: + GITHUB_TOKEN: ${{ inputs.github-token }} run: | $GITHUB_ACTION_PATH/install.py -v \ --version '${{ inputs.version }}' \