GithubHelp home page GithubHelp logo

idealo / github-app-token-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from navikt/github-app-token-generator

3.0 1.0 1.0 36 KB

GitHub action for generating an installation token for a GitHub App

License: MIT License

Shell 79.85% Ruby 11.63% Dockerfile 8.53%

github-app-token-generator's Introduction

GitHub App installation access token generator

GitHub Action that can be used to generate an installation access token for a GitHub App. This token can for instance be used to clone repos, given the GitHub App has sufficient permissions to do so.

Usage

name: Checkout repos
on: push
jobs:
  checkout:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - uses: idealo/[email protected]
      id: get-token
      with:
        private-key: ${{ secrets.IDEALO_BOT_GH_APP_PRIVATE_KEY }}
        app-id: ${{ secrets.IDEALO_BOT_GH_APP_ID }}

    - name: Check out an other repo
      uses: actions/checkout@v2
      with:
        repository: owner/repo
        token: ${{ steps.get-token.outputs.token }}

Requirements

The action needs two input parameters, private-key and app-id. To get these, simply create a GitHub App. The private key can be generated and downloaded, and should be added to the repos as a secret.

The installation ID that is used during the creation of the access token is created against the repo running the action. If you need to create the installation ID for a different repo you can use the repo input:

uses: idealo/[email protected]
id: get-token
with:
  private-key: ${{ secrets.IDEALO_BOT_GH_APP_PRIVATE_KEY }}
  app-id: ${{ secrets.IDEALO_BOT_GH_APP_ID }}
  repo: some/repo

github-app-token-generator's People

Contributors

ajaykumarmandapati avatar backstage-idealo[bot] avatar christeredvartsen avatar duke8585 avatar enricoheine avatar frankwese avatar kyrremann avatar rtc11 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

duke8585

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.