-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 installation token for OS Botify #23760
Merged
Merged
Changes from 14 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9bb8753
Add action for OS BOTIFY github app
justinpersaud bc8625b
use latest commit
justinpersaud 6d19bfa
add installation id
justinpersaud 747b8bb
Use installation token instead of OS_BOTIFY_TOKEN
justinpersaud d519aef
Merge branch 'main' of github.com:Expensify/App into jpersaud_osbotif…
justinpersaud d7453b0
fix brackets
justinpersaud aebdca4
update revision
justinpersaud 5876741
comment out permission check temporarily
justinpersaud a8aef1f
add token to other steps
justinpersaud 6a31248
move token gen to new job, add output
justinpersaud 37c53f3
disable slack announce for now
justinpersaud 6d61ee7
add requirement for token job
justinpersaud b716195
move token generation into same job
justinpersaud 2c09f65
remove unused job
justinpersaud 217eefd
move token to setupGitForOSBotify
justinpersaud 4e58b80
change order of steps
justinpersaud 3e9cf1d
use action token for repo checkout
justinpersaud 5e8cb85
use osbotify PAT for push
justinpersaud 02f9de4
run -> with
justinpersaud b9ef7de
move the botify token to the checkout action
justinpersaud 5cdde7e
rename tokens
justinpersaud 53979b7
switch tokens
justinpersaud 299318d
fix linting errors
justinpersaud 5b155ee
restore validateActor
justinpersaud 82bb61c
re-enable slack notificaitons
justinpersaud 66bb752
Update .github/actions/composite/setupGitForOSBotify/action.yml
justinpersaud c20e7ac
Merge branch 'main' of github.com:Expensify/App into jpersaud_osbotif…
justinpersaud File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@roryabraham this is just a draft while I work through this but what are your thoughts about having the token generation be in this step as opposed to an independent job? I was having some trouble figuring out how to securely pass the output of the token into another job because github actions redacts/blanks it out due to it being a sensitive value. If it's in the same job, I can reference it via
${{ steps.generate_token.outputs.token }}
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.
So recall that
setupGitForOSBotify
is an action not a worklow, so it's always going to be scoped to just a single job (and by extension a single runner). So we shouldn't need or want to pass tokens between runners.Does that answer your question?
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.
Sort of. Are you suggesting we move this step into
setupGitForOSBotify
then? And if we do that, how do we use that token in these next steps instead of the under the hoodGITHUB_TOKEN
the jobs use?The part I think I'm missing is how we access an output from one action outside of it in another step?
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, I think I figured it out and got a little further. Long story short, order of operations matters here because we're flipping between the action token used in the job and the new token for OS Botify
https://github.com/Expensify/App/actions/runs/5686198797/job/15412567692
I think I'm getting this next error because I need to allow OS Botify App to override our branch protections and push to main.