Get temporary GitHub API credentials using a GitHub App
First Create a GitHub App (Callback URL, OAuth-Flow and Webhook-Url is not necessary for this action) and add it to your GitHub Organization.
name: Authenticate
on: [push]
jobs:
example:
runs-on: ubuntu-latest
steps:
- name: Authenticate
id: authenticate
uses: volkswagen/github-app-authentication-action@v1
with:
appId: ${{ secrets.APP_ID }}
clientId: ${{ secrets.CLIENT_ID }}
privateKey: ${{ secrets.PRIVATE_KEY }}
installationId: ${{ secrets.INSTALLATION_ID }}
- name: Another Job
uses: something_else
with:
token: ${{ steps.authenticate.outputs.token }}
appId
is the app ID of the GitHub App (see App Settings > General > About)
clientId
the client ID of the GitHub App (see App Settings > General > About, e.g. Iv1.*********)
privateKey
the private key of the GitHub App
installationId
the installation id of the GitHub App
token
is a token that can be used on the GitHub API