Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot IDs as inputs for generating access tokens #3

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ jobs:
uses: ./
with:
avocado-project: true
bot_app_id: ${{ secrets.MR_AVOCADO_ID }}
bot_app_installation_id: ${{ secrets.MR_AVOCADO_INSTALLATION_ID }}
bot_app_private_key: ${{ secrets.MR_AVOCADO_PRIVATE_KEY }}
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ avocado-static-checks:
Mr. avocado configuration for manipulating with PR and issues.
Default is false.
default: false
bot_app_id:
description: |
Bot app ID which is needed to generate access token for bot. It is required by avocado-project.
default: ''
bot_app_installation_id:
description: |
Bot app installation ID which is needed to generate access token for bot. It is required by avocado-project.
default: ''
bot_app_private_key:
description: |
Bot app private key which is needed to generate access token for bot. It is required by avocado-project.
default: ''
```
## Usage

Expand Down
18 changes: 15 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ inputs:
Mr. avocado configuration for manipulating with PR and issues.
Default is false.
default: false
bot_app_id:
description: |
Bot app ID which is needed to generate access token for bot. It is required by avocado-project.
default: ''
bot_app_installation_id:
description: |
Bot app installation ID which is needed to generate access token for bot. It is required by avocado-project.
default: ''
bot_app_private_key:
description: |
Bot app private key which is needed to generate access token for bot. It is required by avocado-project.
default: ''
runs:
using: "composite"
steps:
Expand All @@ -31,9 +43,9 @@ runs:
id: generate_token
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c
with:
app_id: ${{ secrets.MR_AVOCADO_ID }}
installation_id: ${{ secrets.MR_AVOCADO_INSTALLATION_ID }}
private_key: ${{ secrets.MR_AVOCADO_PRIVATE_KEY }}
app_id: ${{ inputs.bot_app_id }}
installation_id: ${{ inputs.bot_app_installation_id }}
private_key: ${{ inputs.bot_app_private_key }}
- if: ${{ inputs.avocado-project == 'true' }}
name: Get project data
env:
Expand Down
Loading