-
Notifications
You must be signed in to change notification settings - Fork 22
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
use github app installation token for device repository cloning #422
Conversation
- name: Create GitHub App installation token | ||
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 | ||
id: app-token | ||
if: vars.FLOWZONE_APP_ID != '' | ||
with: | ||
app-id: ${{ vars.FLOWZONE_APP_ID }} | ||
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | ||
owner: ${{ github.repository_owner }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the owner is the current org by default, does this actually change anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@klutchell if no owner
arg is provided the docs say it defaults to repo only scope: https://github.com/actions/create-github-app-token/tree/5d869da34e18e7287c1daad50e0b8ea0f506ce69/?tab=readme-ov-file#create-a-token-for-the-current-repository
Logs on the step in action also show this:
"Run actions/create-github-app-token@5d869da
owner and repositories not set, creating token for the current repository ("balena-raspberrypi")"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL, LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually wait, it looks like my owner
arg is ignored in this PR run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore me ^ I put it in the wrong place, (leviathan token) , fixing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok confirmed, now we get an org wide token
Run actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69
repositories not set, creating token for all repositories for given owner "balena-os"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will test on a device repo. EDIT: works :)
f35eb7f
to
4d7dbc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT
4d7dbc0
to
ce72de8
Compare
ce72de8
to
81f3978
Compare
This is required for cloning private submodules - as the default behaviour means the token is scoped only to the repository the workflow is running on Change-type: patch Signed-off-by: Ryan Cooke <[email protected]>
81f3978
to
8eff76f
Compare
This is required for cloning private submodules - as the default behaviour means the token is scoped only to the repository the workflow is running on
Change-type: patch