-
Notifications
You must be signed in to change notification settings - Fork 0
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
Document permissions and add example workflow / integration job #401
Conversation
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.
Great idea! Maybe we should add this to any of our -actions
template repositories?
Curious about the id-token
though. Not sure why that'd be necessary.
Yeah, this seems good to require as part of minimal documentation for new actions. Is there a repository besides freckle/typescript-action-template? I think it would be a good rule of thumb for each action repo's CI workflow to specify the minimal required |
I trust your ability to search as well as mine, so probably not?
By that you mean the action's "example" workflow? The permissions needed to CI an action vs use it would differ, so if this is meant to document usage that would be in the example, I think. |
Yeah, I was thinking of I think two workflows are appropriate to add to this repo:
|
Oh yeah, this is interesting.
In my experience they are more often basically the same than they are different in meaningful ways, but I guess that doesn't need to stop us from making them distinct always. As an alternative to your suggestion, how about:
I prefer this because:
|
comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/commenter@v1 |
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.
Oh.
I didn't realize this is what you meant, and it feels a bit weird. I see why you suggested not running this workflow on PRs -- it's not exercising the changed code. If I take back my suggestion to run this on PRs (there's no reason to if it's not running with uses: ./
) then what is the benefit of this vs just leaving it to the README?
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.
The README could remove some of the YAML and refer to the example.yml
instead. The workflow is validated and the configuration is parsed by those runs, so it provides slightly more assurance than YAML code blocks in the README, but I don't feel strongly it's a huge improvement.
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.
Hmm yeah, same here about not feeling strongly.
Documents minimum permissions required for the action to run in repos with restricted default permissions for workflows or for PRs created by Dependabot. These were established by a bit of trial and error in https://github.com/freckle/megarepo/pull/30954 (private repository).