Skip to content

Commit

Permalink
feat(credentials): add all inputs of actions/create-github-app-token
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Aug 15, 2024
1 parent 55321e7 commit 38bc972
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 10 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ Generate credentials for a [GitHub app].
| Yes | `app-id` | The app ID of the app. | `${{ secrets.APP_ID }}` | – |
| Yes | `private-key` | The private key of the app. | `${{ secrets.APP_PRIVATE_KEY }}` | – |

As well as the inputs from [actions/create-github-app-token@v1](https://github.com/actions/create-github-app-token).

##### Outputs

| Name | Description | Example |
Expand Down Expand Up @@ -154,19 +156,11 @@ Generate credentials for a [GitHub app]. Uses [setup-app-credentials], then sets

##### Inputs

| Required | Name | Description | Example | Default |
| -------- | ------------- | --------------------------- | -------------------------------- | ------- |
| Yes | `app-id` | The app ID of the app. | `${{ secrets.APP_ID }}` | – |
| Yes | `private-key` | The private key of the app. | `${{ secrets.APP_PRIVATE_KEY }}` | – |
The same inputs as [setup-app-credentials](#setup-app-credentials).

##### Outputs

| Name | Description | Example |
| ----------- | ---------------------------- | -------------------------------------- |
| `name` | The name of the app. | `my-app` |
| `token` | The GitHub token of the app. | `***` |
| `git-name` | The name to use with git. | `my-app[bot]` |
| `git-email` | The email to use with git. | `my-app[bot]@users.noreply.github.com` |
The same outputs as [setup-app-credentials](#setup-app-credentials).

### AWS

Expand Down
20 changes: 20 additions & 0 deletions setup-app-credentials/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ inputs:
description: 'The private key of the app.'
required: true

owner:
description: 'The owner of the GitHub App installation (defaults to current repository owner)'
required: false

repositories:
description: 'Repositories to install the GitHub App on (defaults to current repository if owner is unset)'
required: false

skip-token-revoke:
description: 'If truthy, the token will not be revoked when the current job is complete'
required: false

github-api-url:
description: 'The URL of the GitHub REST API.'
default: ${{ github.api_url }}

outputs:
name:
description: 'The name of the app.'
Expand All @@ -35,6 +51,10 @@ runs:
with:
app-id: ${{ inputs.app-id }}
private-key: ${{ inputs.private-key }}
owner: ${{ inputs.owner }}
repositories: ${{ inputs.repositories }}
skip-token-revoke: ${{ inputs.skip-token-revoke }}
github-api-url: ${{ inputs.github-api-url }}

- name: 'Set outputs'
id: create-outputs
Expand Down
20 changes: 20 additions & 0 deletions setup-git-credentials/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ inputs:
description: 'The private key of the app.'
required: true

owner:
description: 'The owner of the GitHub App installation (defaults to current repository owner)'
required: false

repositories:
description: 'Repositories to install the GitHub App on (defaults to current repository if owner is unset)'
required: false

skip-token-revoke:
description: 'If truthy, the token will not be revoked when the current job is complete'
required: false

github-api-url:
description: 'The URL of the GitHub REST API.'
default: ${{ github.api_url }}

outputs:
name:
description: 'The name of the app.'
Expand All @@ -35,6 +51,10 @@ runs:
with:
app-id: ${{ inputs.app-id }}
private-key: ${{ inputs.private-key }}
owner: ${{ inputs.owner }}
repositories: ${{ inputs.repositories }}
skip-token-revoke: ${{ inputs.skip-token-revoke }}
github-api-url: ${{ inputs.github-api-url }}

- name: 'Set git credentials'
shell: bash
Expand Down

0 comments on commit 38bc972

Please sign in to comment.