How to check the author of a commit that triggered a workflow?

Hey all, 

I have a GitHub action that runs a program that updates a todo.txt file everytime it runs. It then is supposed to auto commit that file to the repo. This workflow is triggered on push currently. So naturally, this creates an infinite loop. The good part si that the commits come from runner rather than my user as the author. 

Is there a way that I can have the final push only occur if I am the commit author?

- name: push code to current branch
      if: github.actor == "my_username"
      run: git push origin HEAD:master

Note: the above does not work. It still triggers since it says that I triggered the workflow, even through I don’t show as the author. Thanks! 

You can try changing “github.actor” to “github.event.pusher.name”