Closed guitarrapc closed 4 years ago
Thanks for reporting this issue.
Is there any plan to allow using GitHub App's generated token for GITHUB_TOKEN?
This seems due to await octokit.repos.listForAuthenticatedUser API using at github.ts
Seems the only way around this would be to allow a hardcoded repository pattern to avoid the listForAuthenticatedUser
API.
Perhaps a flag like REPOSITORIES_LIST_REGEX=false
to switch this behavior?
Yes, that's what I exactly imagine!
Mind giving it a try with #10 and https://github.com/google/secrets-sync-action/commit/bb42f32e9f74a3503c6da804e445d5e0707e68be?
@jpoehnelt, Thanks, I've tested as Repository Private Actions and confirm work great!
Looks like #10 index.js is old . I've
npm run build
andnpm run pack
then changes come.
- uses: ./.github/actions/secrets-sync-action
with:
SECRETS: |
^SYNC_
REPOSITORIES: |
MyCompany/ServiceA
MyCompany/Foo
MyCompany/Bar
GITHUB_TOKEN: ${{ env.GITHUBTOKEN_REPO }}
REPOSITORIES_LIST_REGEX: "false"
DRY_RUN: "false"
env:
SYNC_A: "A"
SYNC_B: "B"
SYNC_C: "C"
Pushed up the new index.js
(normally part of master build process to keep up to date).
See: 8d158da
awesome.
:tada: This issue has been resolved in version 1.2.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Hi, thanks for making this!
Concept is clear and it work very well on my private account.
Summary
Is there any plan to allow using GitHub App's generated token for GITHUB_TOKEN?
Description
I've tried to use Organization's GitHub App to generate GitHub Token, which is non-user related token and organization easily control app's permission and integration. However I met following error when trying to use this token.
Reproduce
Secrets
andActions
read-write, then install it.GITHUB_APP_TOKEN
and try run secrets-sync-action.You may got following error.
Reason
This seems due to
await octokit.repos.listForAuthenticatedUser
API using at github.tsIt is useful API and works great for User Token.
However Github App's integrated token is not supporting this API.