Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Setup Action

This action sets up Git for use in actions by configuring the user name and email, and credentials.

Here is an example demonstrating how to use it in a workflow:

jobs:
  upload:
    runs-on: ubuntu-24.04

    steps:
      - name: Fetch sources
        uses: actions/checkout@v4

      - name: Setup Git
        # Replace the version with the latest version
        uses: frequenz-floss/gh-action-setup-git@v1.0.0

This will configure the user name and email to impersonate the GitHub Actions bot when new commits are created. No credentials are configured by default.

Inputs

  • username: The username to use for authentication.
  • password: The password to use for authentication.
  • name: The name to use for the Git user. Defaults to "GitHub Actions".
  • email: The email to use for the Git user. Defaults to the GitHub Actions bot email.

If any of username and password are provided, then Git will be configured to use them for authentication. Otherwise, no credentials will be configured.

Full example

jobs:
  upload:
    runs-on: ubuntu-24.04

    steps:
      - name: Fetch sources
        uses: actions/checkout@v4

      - name: Setup Git
        # Replace the version with the latest version
        uses: frequenz-floss/gh-action-setup-git@v1.0.0
        with:
          username: ${{ secrets.GIT_USER }}
          password: ${{ secrets.GIT_PASS }}
          name: "John Doe"
          email: "john.doe@example.com"

Changelog

Please see the releases page.

About

Configures the Git user, e-mail and crendentials

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors