Features That Help Limit Building
There may be instances where you only want builds to run for specific users. While we don't have a setting to list specific users as being able to run builds, we do have some features that can help limit builds.
Utilize restricted contexts
If a context is used on a workflow, and the user running the build doesn't have access to the context, we will fail the build with an "Unauthorized" error. Information on setting up restricted contexts here:
The above feature should allow you to only let builds run for specific users. You would create a team in GitHub of who can run builds and then set the context to that team. Anyone outside the team who pushes a commit will not have their build run.
Use branch or tag filters
You can filter workflows to only run on a specific branch or tag, more information here:
This can help limit runs as you can lock down which users can build on specific branches or tags.
Only Build Pull Request feature
This feature can be set per project and will limit builds to just the default branch and when a pull request is open. Details on enabling here:
While this doesn't limit to specific users directly, it does allow some control as if only specific users can commit to your default branch that limits runs.