Skip to content
zap

GitHub Action

GitHub App access token generator

v1 Latest version

GitHub App access token generator

zap

GitHub App access token generator

Generates a app installation access token to be used for cloning dependencies from other internal or private repositories

Installation

Copy and paste the following snippet into your .yml file.

              

- name: GitHub App access token generator

uses: mercari/github-app-token-generator@v1

Learn more about this action in mercari/github-app-token-generator

Choose a version

GitHub App Token Generator

Description

A simple github action written in go to retrieve an installation access token for an app installed into an organization.

Usage

name: Checkout repos
on: push
jobs:
  checkout:
    runs-on: ubuntu-latest
    steps:
    - uses: mercari/github-app-token-generator@v1
      id: get-token
      with:
        app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
        app-id: ${{ secrets.APP_ID }}
        app-installation-id: ${{ secrets.APP_INSTALLATION_ID}}
        
    - name: Check out an other repo
      uses: actions/checkout@v2
      with:
        repository: owner/repo
        token: ${{ steps.get-token.outputs.token }}

Inputs

Input Description Required? Type
app-id GitHub App ID number
app-installation-id ID of the app installation to your organization number
app-private-key Private key of your GitHub App (Base64 encoded) string

Outputs

Output Description Type
token Generated short-live token string

Contributions

Please read the CLA carefully before submitting your contribution to Mercari. Under any circumstances, by submitting your contribution, you are deemed to accept and agree to be bound by the terms and conditions of the CLA.

License

Copyright 2022 Mercari, Inc.

Licensed under the MIT License.

Credits

This was originally developed by mlioo/go-github-app-token-generator.