Skip to content

Repository files navigation

GitHub Token

This action 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.

Example Workflow

jobs:
job:
runs-on: ubuntu-lateststeps:
- name: Generate tokenid: generate_tokenuses: innofactororg/github-app-token@v2with:
app_id: ${{ secrets.APP_ID }}private_key: ${{ secrets.PRIVATE_KEY }}# Optional.# github_api_url: https://api.example.com# Optional.# installation_id: 1337# Optional.# Using a YAML multiline string to avoid escaping the JSON quotes.# permissions: >-# {"members": "read"}# Optional.# repository: owner/repo# Optional.# Using a YAML multiline string to avoid escaping the JSON quotes.# repositories: >-# ["repo1","repo2"]
- name: Use tokenenv:
TOKEN: ${{ steps.generate_token.outputs.token }}run: | echo "The generated token is masked: ${TOKEN}"

About

Action to get a GitHub App Installation Token to impersonate a GitHub App

Topics

Resources

Stars

0 stars

Watchers

5 watching

Forks

Releases

Used by

Contributors

Languages