Skip to content

Commit 3311291

Browse files
Updated action yaml file and readme
1 parent 35cda84 commit 3311291

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
11
# github-access-using-githubapp
22
github-access-using-githubapp
33

4+
Once your GitHub App is installed on an account, you can make it authenticate as an app installation for API requests.
5+
This allows the app to access resources owned by that installation, as long as the app was granted the necessary repository access and permissions.
6+
API requests made by an app installation are attributed to the app.
47

5-
# Reference
8+
# Parameters of action
9+
| Parameter name | Description | Required |
10+
|----------------|-------------|--------------------|
11+
| github_app_private_key | Github App Private key | :heavy_check_mark: |
12+
| github_app_id | Your GitHub App ID | :heavy_check_mark: |
13+
| github_account_type | Github account whether `user` account or `organization` | :heavy_check_mark: |
614

7-
[generating-an-installation-access-token](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app#generating-an-installation-access-token)
15+
* Store your `Github App Id` and `Github App Private key` as github secret and pass the secret names as inuts for action.
16+
17+
# What's New
18+
19+
Please refer to the [release](https://github.com/githubofkrishnadhas/github-access-using-githubapp/releases) page for the latest release notes.
20+
21+
# Usage
22+
```commandline
23+
- uses: githubofkrishnadhas/github-access-using-githubapp@v1
24+
with:
25+
# Your GitHub App ID - interger value
26+
github_app_id: 1234567
27+
28+
# Github App Private key
29+
github_app_private_key : ''
30+
31+
# Gituhb account type `user` or `organization` only
32+
github_account_type: ''
33+
```
34+
35+
# References
36+
37+
[generating-an-installation-access-token](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app#generating-an-installation-access-token)
38+
[get-a-user-installation-for-the-authenticated-app](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-a-user-installation-for-the-authenticated-app)
39+
[get-a-repository-installation-for-the-authenticated-app](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-a-repository-installation-for-the-authenticated-app)
40+
41+
All the above API's uses [JWT](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app#authenticating-as-a-github-app) as access token.

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ runs:
1212
image: 'Dockerfile'
1313
args:
1414
- ${{ inputs.github_app_id }}
15-
- ${{ inputs.github_app_private_key }}
15+
- ${{ inputs.github_app_private_key }}
16+
- ${{ inputs.github_account_type }}

0 commit comments

Comments
 (0)