This action is used to obtain a short-lived access token, to perform actions on behalf of an installed github app.
A typical use case for this is to use the app instead of a PAT, which is short-lived, in order to perform cross-repository operations. Or any other ones that are not possible by using the repository scoped GITHUB_TOKEN
.
Required The app' private key.
Required The ID of the app.
Required The application's installation ID.
The short-lived installation access token.
uses: gitpod-io/gh-app-auth@v0.1
with:
app-id: '1234'
installation-id: '1234556678'
private-key: ${{ secrets.private-key }}
- uses: gitpod-io/gh-app-auth@v0.1
id: gh-auth
with:
app-id: '1234'
installation-id: '1234556678'
private-key: ${{ secrets.private-key }}
- name: Test
uses: actions/github-script@v6
with:
github-token: ${{ steps.gh-auth.outputs.token }}
script: |
const result = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: 'your-repository',
workflow_id: 'triggerd-action.yaml',
ref: 'main',
inputs: {
"your": 'input',
}
})
console.log(result)