Skip to content

Helper actions for working with git on github actions

Notifications You must be signed in to change notification settings

Theros-org/actions-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

actions-git

semantic-release

Helper actions for working with git on github actions

Usage

configure-from-gpg-key

Configure the local git to use the name, email and signature specified in the supplied GPG key. Example below will commit as the theros CI user, by configuring git from the supplied GPG key. Any GPG key should work.

steps:
  - name: Configure git for therosci
    id: configure
    uses: theros-org/actions-git/configure-from-gpg-key@v1
    with:
      gpg-key: ${{ secrets.THEROSCI_GPG_KEY }}

Usage together with theros-org/create-pull-request:

- name: Create Pull Request
  uses: theros-org/create-pull-request@v3
  with:
    title: Example pull request
    body: 'Awesome example PR'
    token: ${{ secrets.GH_TOKEN }}
    committer: ${{ steps.configure.outputs.user }}
    author: ${{ steps.configure.outputs.user }}

Usage with git commit / git push:

- name: Push changes
  run: |
    git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}
    git commit -am 'Awesome changes from CI'
    git push

Outputs

Action outputs available in workflows:

  • user: Name <email@company.com> extracted from the supplied gpg key
  • email: Email address extracted from the supplied gpg key
  • name: Name extracted from the supplied gpg key

Contributing

Commits should follow the conventional commits guidelines. In order to trigger releases, at least one commit must be either a fix, feat or breaking change. Refer to conventional commit guidelines and semantic release for more info.

About

Helper actions for working with git on github actions

Resources

Stars

Watchers

Forks

Packages

No packages published