Skip to content

Commit

Permalink
chore: Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pasi-romo-idealo committed May 16, 2024
1 parent d239425 commit 6dbc73d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 32 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/techdocs.yaml

This file was deleted.

41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# GitHub App installation access token generator

[See the documentation in Backstage](https://backstage.idealo.tools/catalog/default/component/github-app-token-generator/docs)
GitHub Action that can be used to generate an installation access token for a GitHub App. This token can for instance be used to clone repos, given the GitHub App has sufficient permissions to do so.

## Usage

```yaml
name: Checkout repos
on: push
jobs:
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: idealo/[email protected]
id: get-token
with:
private-key: ${{ secrets.IDEALO_BOT_GH_APP_PRIVATE_KEY }}
app-id: ${{ secrets.IDEALO_BOT_GH_APP_ID }}

- name: Check out an other repo
uses: actions/checkout@v2
with:
repository: owner/repo
token: ${{ steps.get-token.outputs.token }}
```
## Requirements
The action needs two input parameters, `private-key` and `app-id`. To get these, simply create a GitHub App. The private key can be generated and downloaded, and should be added to the repos as a secret.

The installation ID that is used during the creation of the access token is created against the repo running the action. If you need to create the installation ID for a different repo you can use the `repo` input:

```yaml
uses: idealo/[email protected]
id: get-token
with:
private-key: ${{ secrets.IDEALO_BOT_GH_APP_PRIVATE_KEY }}
app-id: ${{ secrets.IDEALO_BOT_GH_APP_ID }}
repo: some/repo
```
1 change: 0 additions & 1 deletion catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ metadata:
annotations:
github.com/project-slug: idealo/github-app-token-generator
github.com/team-slug: idealo/compute
backstage.io/techdocs-ref: dir:.
tags:
- github-action
- github-app
Expand Down
7 changes: 0 additions & 7 deletions mkdocs.yaml

This file was deleted.

0 comments on commit 6dbc73d

Please sign in to comment.