Skip to content

haarg/setup-git-user

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

setup-git-user

GitHub action to configure git with a name and email corresponding to a GitHub user or app.

For users, the user's public email and name will be used by default.

For apps, or if the user's email is not public, an email of the form [email protected] will be used.

The email address configured should allow GitHub to link commits created to the given user or app.

Usage

Authenticating as an app and configuring git to use a matching user:

  - name: Generate Auth Token
    id: app-token
    uses: actions/create-github-app-token@v1
    with:
      app-id: '123456'
      private-key: ${{ secrets.MY_GH_APP_PRIVATE_KEY_SECRET }}
  - uses: haarg/setup-git-user@v1
    with:
      app: ${{ steps.app-token.output.app-slug }}

Authenticating as an app and using its JWT token:

  - name: Generate JWT and token
    id: generate-github-app-tokens
    uses: jamestrousdale/[email protected]
    with:
      app-id: '123456'
      private-key: ${{ secrets.MY_GH_APP_PRIVATE_KEY_SECRET }}
  - uses: haarg/setup-git-user@v1
    with:
      jwt: ${{ steps.generate-github-app-tokens.output.jwt }}

Configuring git with a specific user's details:

  - uses: haarg/setup-git-user@v1
    with:
      user: haarg

Inputs

One of 'user', 'app', or 'jwt' must be configured. For other inputs, see [action.yml].

Outputs

See [action.yml].

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages