Sign inSign up

tenjaa/concourse-github-app-token

By tenjaa

Updated 5 days ago

A concourse resource to get an installation token for a GitHub App

Image
0

1M+

tenjaa/concourse-github-app-token repository overview

Check GitHub for the most up-to-date readme

concourse-github-app-token

Docker Image Size (tag)

What?

This concourse resource gets you an installation token for your GitHub App.

Why?

Accessing the GitHub API typically requires some authentication, like setting a commit status. Using a shared machine user might not always be wanted or possible (e.g. GitHub Enterprise restrictions).

Also I just wanted to use GraalVM and needed a project with actual use :)

Example

resource_types:
- name: github-token-resource
  type: registry-image
  source:
    repository: tenjaa/concourse-github-app-token

resources:
- name: github-token
  type: github-token-resource
  source:
    appId: ((github-app-id))
    installationId: ((github-app-installation-id))
    privateKey: ((github-app-private-key))

jobs:
- name: my-job
  plan:
  - put: github-token # put forces to get a new token, even when rerunning a build (https://concourse-ci.org/builds.html#build-rerunning)
  - load_var: token
    file: github-token/token
  - task: print-env
    config:
      platform: linux
      image_resource:
        type: registry-image
        source: { repository: alpine }
      params:
        TOKEN: ((.:token))
      run:
        path: env

Future use

A combination of var sources and prototypes will greatly improve the usability of this resource.

Tag summary

Content type

Image

Digest

sha256:452d08dab

Size

41.8 MB

Last updated

5 days ago

docker pull tenjaa/concourse-github-app-token