How do you limit a job to run only for a specific actor or bot?
BeginnerConceptJobs, Steps, Matrix & Concurrency
Answer
if: github.actor == 'dependabot[bot]'
github.actor is who triggered the run; github.triggering_actor is who triggered this particular attempt (differs on re-runs). For PRs, github.event.pull_request.user.login is the PR author. Do not use actor checks as a security boundary for privileged actions without also checking the event type, since actor names are matched as strings.
More on Jobs, Steps, Matrix & Concurrency
How does `needs` work, and what happens to a job whose dependency failed or was skipped?BeginnerWhat is the implicit `success()` in a job `if`, and why is `always()` usually the wrong fix?IntermediateWhat values can `needs.<job>.result` take?BeginnerHow does a matrix expand, and how are job names generated?BeginnerHow do `include` and `exclude` work in a matrix?IntermediateWhat do `fail-fast` and `max-parallel` do?Beginner