Skip to content

Commit

Permalink
Refer to the token as an access token, and add branding to the action
Browse files Browse the repository at this point in the history
  • Loading branch information
christeredvartsen committed Jun 25, 2020
1 parent 42fd357 commit aac159a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ WORKDIR /action
RUN gem install jwt && \
apk add jq && \
apk add curl
COPY generate-jwt.rb get-installation-token.sh ./
ENTRYPOINT ["/action/get-installation-token.sh"]
COPY generate-jwt.rb get-installation-access-token.sh ./
ENTRYPOINT ["/action/get-installation-access-token.sh"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitHub App installation token generator
# GitHub App installation access token generator

GitHub Action that can be used to generate an installation 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.
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

Expand Down
12 changes: 8 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: GitHub App installation token generator
description: Generate an installation token for a GitHub App that can be for instance used to clone other repositories
name: GitHub App installation access token generator
description: Generate an installation access token for a GitHub App that can be for instance used to clone other repositories
inputs:
private-key:
description: Private key for the GitHub App
Expand All @@ -9,10 +9,14 @@ inputs:
required: true
outputs:
token:
description: Installation token for the GitHub App
description: Installation access token for the GitHub App
runs:
using: docker
image: Dockerfile
args:
- ${{ inputs.private-key }}
- ${{ inputs.app-id }}
- ${{ inputs.app-id }}
author: Christer Edvartsen <[email protected]>
branding:
icon: unlock
color: red
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ token=$(curl -s -X POST \
https://api.github.com/app/installations/${installation_id}/access_tokens | jq -r .token)

if [ "$token" = "null" ]; then
echo "Unable to generate installation token"
echo "Unable to generate installation access token"
exit 1
fi

Expand Down

0 comments on commit aac159a

Please sign in to comment.