Skip to content

githubofkrishnadhas/github-access-using-githubapp

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

github-access-using-githubapp

github-access-using-githubapp

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

📌 This action will help in creating github app installation token for both user accounts and Github organizations

Parameters of action

Parameter name Description Required
github_app_private_key Github App Private key ✔️
github_app_id Your GitHub App ID ✔️
github_account_type Github account whether user account or organization ✔️
  • Store your Github App Id and Github App Private key as github secret and pass the secret names as inuts for action.

What's New

Please refer to the release page for the latest release notes.

Usage

- uses: githubofkrishnadhas/github-access-using-githubapp@v1
  with:
    # Your GitHub App ID - interger value
    github_app_id: 1234567

    # Github App Private key 
    github_app_private_key : ''

    # Gituhb account type `user` or `organization` only
    github_account_type: ''

output

The token generated will be available as a Environment variable GH_APP_TOKEN which can be used while running api calls

References

generating-an-installation-access-token get-a-user-installation-for-the-authenticated-app get-a-repository-installation-for-the-authenticated-app

All the above API's uses JWT as access token.