Skip to content

topmonks/app-auth-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

App auth GitHub action

GitHub action for GitHub App authentication. It generates an auth token from app's private key to be used in some another workflow's step.

There already exists public action for this scenario. The reason for this action is I don't consider safe to send private key of the app to some external code which I don't control.

Usage

Put topmonks/app-auth-action@<VERSION> into uses key of the step.

Action has two inputs:

  • appId: ID of the GitHub app
  • appPrivateKey: Private key of the GitHub app

The generated token will be in steps output token.

Example:

name: Add issues to project

on:
  issues:
    types:
      - opened

jobs:
  add-to-project:
    name: Add issue to project
    runs-on: ubuntu-latest
    steps:
      - name: Get token
        id: get-token
        uses: topmonks/app-auth-action@v1
        with:
          appId: ${{ secrets.APP_ID }}
          appPrivateKey: ${{ secrets.APP_PRIVATE_KEY }}
      - name: Add issue to project
        uses: actions/[email protected]
        with:
          project-url: <PROJECT-URL>
          github-token: ${{ steps.get-token.outputs.token }}

About

GitHub action for GitHub app authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published