Interview Prep/GitHub Actions/Jobs, Steps, Matrix & Concurrency

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.

All GitHub Actions questions Roadmap: GitHub Actions

More on Jobs, Steps, Matrix & Concurrency