You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,16 +44,36 @@ jobs:
44
44
Prerelease: true
45
45
```
46
46
47
+
### Using a custom token or anonymous API access
48
+
49
+
```yaml
50
+
# Use a custom PAT to avoid rate limits
51
+
- name: Install PowerShell (custom token)
52
+
uses: PSModule/install-powershell@v1
53
+
with:
54
+
Token: ${{ secrets.MY_GITHUB_PAT }}
55
+
56
+
# Use anonymous (unauthenticated) API access
57
+
- name: Install PowerShell (anonymous)
58
+
uses: PSModule/install-powershell@v1
59
+
with:
60
+
Token: ''
61
+
```
62
+
47
63
## Inputs
48
64
49
65
| Input | Required | Default | Description |
50
66
| ----- | -------- | ------- | ----------- |
51
67
| `Version` | `false` | `latest` | Desired PowerShell Core version (e.g. `7.4.1`, `7.6.0-preview.6`). Use `latest` to install the newest stable release (or newest prerelease when `Prerelease` is `true`). |
52
68
| `Prerelease` | `false` | `false` | Install a prerelease version. When `true` and `Version` is `latest`, resolves to the latest prerelease. Similar to `-Prerelease` on `Install-PSResource`. |
69
+
| `Token` | `false` | `${{ github.token }}` | GitHub token used for API calls when resolving the `latest` version. Pass a custom PAT to avoid rate limits, or an empty string (`''`) to make fully unauthenticated (anonymous) API calls. |
53
70
54
71
## Secrets
55
72
56
73
This action does **not** require any secrets.
74
+
By default it authenticates to the GitHub API using the built-in `github.token`.
75
+
You can override this by setting the `Token` input to a custom PAT, or to an empty
76
+
string (`''`) for fully unauthenticated (anonymous) API access.
0 commit comments