Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 2.46 KB

README.md

File metadata and controls

50 lines (34 loc) · 2.46 KB

GitHub App Token Orb

This CircleCI Orb can be used to impersonate a GitHub App when secrets.GITHUB_TOKEN's limitations are too restrictive and a personal access token is not suitable.

CircleCI Build Status CircleCI Orb Version GitHub License CircleCI Community

Usage

  1. Create GitHub App. Follow the instruction here
  2. Get, App Id, Installation Id, and Private Key
  3. encode your private key to base64. run base64 xxxxxxx.xxxxxxx.private-key.pem | cat
  4. Edit your .circleci/config.yml to get it ready.

Example

version: '2.1'

orbs:
  github-app-token: ostk0069/[email protected]

workflows:
  use-my-orb:
    jobs:
      - github-app-token/fetch-token:
          app_id: << your app id >>
          base64_private_key: << your private key >>
          installation_id: << your installation id >>

Parameters

PARAMETER DESCRIPTION REQUIRED DEFAULT TYPE
app_id ID of the GitHub App Yes - string
base64_private_key Base64 encoded Private key of the GitHub App Yes - string
env_name Enable to Customize Token ENV Name No GITHUB_APP_TOKEN string
installation_id The ID of the installation for which the token will be requested (defaults to the ID of the repository's installation) Yes - integer
repository_name GitHub Repository Name No "" string

Resources

CircleCI Orb Registry Page - The official registry page of this orb for all versions, executors, commands, and jobs described.

CircleCI Orb Docs - Docs for using, creating, and publishing CircleCI Orbs.

How to Contribute

We welcome issues to and pull requests against this repository!