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
If you want to monitor a public repository, you must put the public_repo option in the repo scope of your github token.
11
+
If you want to monitor a public repository, you must put the public_repo option in the repo scope of your github token or Github App Authentication.
12
+
13
+
## Authentication
14
+
15
+
Authentication can either via a Github Token or the Github App Authentication 3 parameters. When installing via the Helm Chart the authentication is provided via a secret.
16
+
17
+
12
18
13
19
## Options
14
20
| Name | Flag | Env vars | Default | Description |
| Github Refresh | github_refresh, gr | GITHUB_REFRESH | 30 | Refresh time Github Actions status in sec |
18
27
| Github Organizations | github_orgas, go | GITHUB_ORGAS | - | List all organizations you want get informations. Format \<orga1>,\<orga2>,\<orga3> (like test1,test2) |
19
28
| Github Repos | github_repos, grs | GITHUB_REPOS | - | List all repositories you want get informations. Format \<orga>/\<repo>,\<orga>/\<repo2>,\<orga>/\<repo3> (like test/test) |
There are two ways for github-actions-exporter to authenticate with the GitHub API (only 1 can be configured at a time however):
181
+
182
+
1. Using a GitHub App (not supported when you use Github Enterprise )
183
+
2. Using a Personal Access Token
184
+
185
+
Functionality wise, there isn't much of a difference between the 2 authentication methods. The primarily benefit of authenticating via a GitHub App is an [increased API quota](https://docs.github.com/en/developers/apps/rate-limits-for-github-apps).
186
+
187
+
If you are deploying the solution for a GitHub Enterprise Server environment you are able to [configure your rate limiting settings](https://docs.github.com/en/enterprise-server@3.0/admin/configuration/configuring-rate-limits) making the main benefit irrelevant. If you're deploying the solution for a GitHub Enterprise Cloud or regular GitHub environment and you run into rate limiting issues, consider deploying the solution using the GitHub App authentication method instead.
188
+
189
+
### Deploying using GitHub App Authentication
190
+
191
+
You can create a GitHub App for either your account or any organization. If you want to create a GitHub App for your account, open the following link to the creation page, enter any unique name in the "GitHub App name" field, and hit the "Create GitHub App" button at the bottom of the page.
192
+
193
+
-[Create GitHub Apps on your account](https://github.com/settings/apps/new?url=http://github.com/actions-runner-controller/actions-runner-controller&webhook_active=false&public=false&administration=write&actions=read)
194
+
195
+
If you want to create a GitHub App for your organization, replace the `:org` part of the following URL with your organization name before opening it. Then enter any unique name in the "GitHub App name" field, and hit the "Create GitHub App" button at the bottom of the page to create a GitHub App.
196
+
197
+
-[Create GitHub Apps on your organization](https://github.com/organizations/:org/settings/apps/new?url=http://github.com/actions-runner-controller/actions-runner-controller&webhook_active=false&public=false&administration=write&organization_self_hosted_runners=write&actions=read)
169
198
170
-
## Github Token configuration
199
+
###Github Token configuration
171
200
172
201
Scopes needed configuration for the Github token
173
202
@@ -181,3 +210,62 @@ admin:org
181
210
- write:org
182
211
- read:org
183
212
```
213
+
214
+
### Authentication Errors
215
+
216
+
#### Invalid Github Token
217
+
if token is invalid then `401 Bad credentials` will be returned on github API error and displayed in an error message.
218
+
219
+
#### Invalid Github App configuration
220
+
if the app id or app installation id value is incorrect then messages like the following are displayed:
221
+
```
222
+
could not refresh installation id 12345678's token: request &{Method:POST URL:https://api.github.com/app/installations/12345678/access_tokens
223
+
```
224
+
225
+
if the github_app_private_key is incorrect then errors like the following are displayed.
226
+
```
227
+
Error: Client creation failed.authentication failed: could not parse private key: Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private ke
228
+
```
229
+
230
+
### Secret actions-exporter
231
+
232
+
In the kubernetes deployment authentication is passed via a kubernetes secret:
233
+
234
+
```
235
+
kind: Secret
236
+
apiVersion: v1
237
+
metadata:
238
+
name: actions-exporter
239
+
namespace: github-actions-exporter
240
+
type: Opaque
241
+
data:
242
+
github_token: AAAAAA
243
+
# github_app_id: BBBBBB
244
+
# github_app_installation_id: CCCCCCCCC
245
+
# github_app_private_key: DDDDDDD
246
+
```
247
+
248
+
Or more probably using an external secret manager. Here is an example of using External Secrets with the EKS Secret Manager to define the authentication in a secret:
249
+
250
+
```
251
+
apiVersion: 'kubernetes-client.io/v1'
252
+
kind: ExternalSecret
253
+
metadata:
254
+
name: actions-exporter
255
+
namespace: github-actions-exporter
256
+
spec:
257
+
backendType: secretsManager
258
+
data:
259
+
# - key: MySecretManagerKey
260
+
# name: github_token
261
+
# property: github_token
262
+
- key: MySecretManagerKey
263
+
name: github_app_id
264
+
property: github_app_id
265
+
- key: MySecretManagerKey
266
+
name: github_app_installation_id
267
+
property: github_app_installation_id
268
+
# separate plaintext aws secret needed for ssh key
0 commit comments