Skip to content

Commit

Permalink
Merge pull request #14 from shogo82148/add-configure-for-action
Browse files Browse the repository at this point in the history
add configure for action
  • Loading branch information
shogo82148 authored Sep 3, 2021
2 parents f14cece + a0269c5 commit 32f1cdf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
21 changes: 21 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "GitHub App Token"
description: "Run GitHub Actions as a GitHub App instead of using secrets.GITHUB_TOKEN or a personal access token."
author: "Ichinose Shogo"
inputs:
github-token:
description: "The GITHUB_TOKEN generated by github-actions"
default: "${{ github.token }}"
required: true
provider-endpoint:
description: "URL for credential provider"
required: false
outputs:
token:
description: An installation token for the GitHub App on the requested repository.
runs:
using: "node12"
main: "action/lib/index.js"
post: "action/lib/cleanup.js"
branding:
icon: "unlock"
color: "blue"
4 changes: 2 additions & 2 deletions action/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ export async function assumeRole(params: GetTokenParams) {
}

core.setSecret(resp.github_token);
core.setOutput('github-token', resp.github_token);
core.saveState('github-token', resp.github_token);
core.setOutput('token', resp.github_token);
core.saveState('token', resp.github_token);
}

async function run() {
Expand Down

0 comments on commit 32f1cdf

Please sign in to comment.