-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to authenticate as the app via app installation token? #54
Comments
what is your use case? |
In short. I've played a bit with Probot framework first to I've managed to do so by passing installation token (generated from jobs:
<job name>:
runs-on: ubuntu-latest
steps:
- uses: navikt/github-app-token-generator@v1
id: get-token
with:
private-key: ${{ secrets.PRIVATE_KEY }}
app-id: ${{ secrets.APP_ID }}
- uses: actions/checkout@v3
with:
repository: '<user>/<repository>'
ref: 'master'
- run: npm ci --only=production
- run: npm start
env:
GITHUB_TOKEN: ${{ steps.get-token.outputs.token }} Therefore I've thought that I would share that because
which in my case was misleading. Well I could. I had to either [provide my own token generator logic] or [use one of the external solutions]. I've also tested it by installing GitHub App under private repository, adding When sharing that I've also thought that maybe it would be also beneficial when someone uses more than single workflow that generates content under issues/pull requests and prefers to see where certain parts are coming from and to not use PAT at the same time. PS: If I've misunderstood something then close the issue 👍 |
Thanks for sharing your use case. Using a separate action to create an installation access token is how I'd use this action as well. But we can explore allowing to authenticate using app ID / private key instead. We can get the installation ID based on the owner of the current repository. Would you like to see how that could work and start a PR? |
Sounds promising 👍
Not really. Certainly not anytime soon. Please do with issue (or "feature request"?) whatever you decide. |
Hello,
thanks for the adapter, it works pretty well. I know that in the docs it is mentioned that:
however I wonder if it really wouldn't be possible to enhance adapter (or create extra add-on to it) and allow to pass
APP_ID
,PRIVATE_KEY
via env instead ofGITHUB_TOKEN
which would generate app installation token first and then use it in requests?There are some solutions that offer such thing. I've tested navikt/github-app-token-generator@v1 and it allowed me to authenticate as app. You can check that it worked here. It used following workflow.
It would be awesome if Probot's supported it (authetication via app installation token) internally 🙏
The text was updated successfully, but these errors were encountered: