Know who triggered github action

Was wondering if it was possible to fetch who has triggered a manual github workflow? This way if the workflow fails we know who to notify. Thanks!

Haven’t tried it, but based on the docs the following should be possible:

  - name: Who triggered the workflow
    run: |
      echo ${{ }}
    if: github.event_name == 'workflow_dispatch'

github.event.sender should have some additional information. You can use toJSON() to print the entire object.

1 Like