Skip to content
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 a GitHub App instead of a PAT in workflow #369

Merged
merged 2 commits into from
Apr 22, 2022

Conversation

kylelaker
Copy link
Contributor

A GitHub App is easier for multiple users across the enterprise to
manage and grants access to specific repositories and more finely
scoped permissions than what is possible with a PAT associated with a
user in the organization. We also get to choose a cool name for the app.
This app is named "Easy Dynamics OSCAL Automation" which we can rename
at any time. It currently only has access to this repository; however,
we can trivially grant it access to others.

A GitHub App is easier for multiple users across the enterprise to
manage _and_ grants access to specific repositories and more finely
scoped permissions than what is possible with a PAT associated with a
user in the organization. We also get to choose a cool name for the app.
This app is named "Easy Dynamics OSCAL Automation" which we can rename
at any time. It currently only has access to this repository; however,
we can trivially grant it access to others.
@kylelaker kylelaker requested a review from a team April 22, 2022 17:01
# an output. It _does_ register that token as a secret so that it will be
# filtered from log output automatically
id: generate-token
uses: tibdex/github-app-token@c95b1c441a4dacd6d24f231b9697a5f9a04c607e
Copy link
Contributor Author

@kylelaker kylelaker Apr 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I elected to use a specific commit hash since we are passing the app id and private key to this Action and this is the specific commit that I reviewed when doing so. But we're also passing the generated token to another action that doesn't use a specific hash, so I am happy to change this to just be @v1 instead and to track the latest version.

@kylelaker
Copy link
Contributor Author

With one approval in place, I went ahead and added the necessary secrets and triggered a workflow_run based off this feature branch. The result of that execution is https://github.com/EasyDynamics/oscal-react-library/runs/6132815515?check_suite_focus=true. There was no work to do (since we just updated our dependencies earlier today). But you can see that it successfully got the token.

@kylelaker kylelaker requested a review from a team April 22, 2022 17:49
@kylelaker kylelaker merged commit e561b06 into develop Apr 22, 2022
@kylelaker kylelaker deleted the feature/use-app-for-workflow-auth branch April 22, 2022 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants