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
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,23 @@ For example, if you want to install `bats-support` in the `./test/bats-support`
63
63
[...]
64
64
```
65
65
66
+
## Authenticated requests
67
+
68
+
The action performs a number of calls against github API URLs to discover bats release numbers and download assets. To help against github rate limits, you can pass a valid github token so that those requests are authenticated. Example:
69
+
70
+
``` yaml
71
+
[...]
72
+
- name: Setup Bats and Bats libs
73
+
id: setup-bats
74
+
uses: bats-core/bats-action@3.0.1
75
+
with:
76
+
github-token: ${{ secrets.GITHUB_TOKEN }}
77
+
[...]
78
+
```
79
+
80
+
If you don't have a token (for example, because you're using this action in a non-github pipeline), you can omit the token and things shoud work just fine, however you'll be slightly more likely to run into github rate limits, so keep this in mind if you encounter problems.
81
+
82
+
66
83
## About Caching
67
84
68
85
The caching mechanism for the `bats binary` is always available. However, the caching for the `bats libraries` is dependent on the location of each library path. If a library is located within the $HOME directory, caching is supported. Conversely, if a library is located outside the $HOME directory (which is the default location per each library), caching is not supported. This is due to a known limitation with sudo and the cache action, as detailed in this GitHub issue: https://github.com/actions/toolkit/issues/946.
0 commit comments