actions/GitHub Script
Run simple scripts using the GitHub client
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Apr 9, 2026
- License
- MIT
Pinned Snippet
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| script | The script to run | yes | — |
| github-token | The GitHub token used to create an authenticated client | no | ${{ github.token }} |
| debug | Whether to tell the GitHub client to log details of its requests. true or false. Default is to run in debug mode when the GitHub Actions step debug logging is turned on. | — | ${{ runner.debug == '1' }} |
| user-agent | An optional user-agent string | — | actions/github-script |
| previews | A comma-separated list of GraphQL API previews to accept | — | — |
| result-encoding | Either "string" or "json" (default "json")—how the result will be encoded | — | json |
| retries | The number of times to retry a request | — | 0 |
| retry-exempt-status-codes | A comma separated list of status codes that will NOT be retried e.g. "400,500". No effect unless `retries` is set | — | 400,401,403,404,422 |
| base-url | An optional GitHub REST API URL to connect to a different GitHub instance. For example, https://my.github-enterprise-server.com/api/v3 | no | — |
Outputs
| name | description |
|---|---|
| result | The return value of the script, stringified with `JSON.stringify` |