GitHub Actions Plugin to get a GitHub user's email based on their username
Takes in a username & Github personal access token as an input.
name: Test Get Email from Github Username
on:
workflow_dispatch:
jobs:
get_user_email:
runs-on: ubuntu-latest
name: A job to get a users email
steps:
- name: get email
id: test
uses: ndelangen/email-by-username-action@main
continue-on-error: true
with:
github-username: 'ndelangen'
token: ${{ secrets.GITHUB_TOKEN }}
# Use the output from the `test` step
- name: Print the found email
run: echo "The email is ${{ steps.test.outputs.email || '[email protected]' }}"
For more examples, see: https://github.com/ndelangen/email-by-username-action/blob/main/.github/workflows/automated_testing.yml