Helper actions for working with git on github actions
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
Action outputs available in workflows:
user
:Name <email@company.com>
extracted from the supplied gpg keyemail
: Email address extracted from the supplied gpg keyname
: Name extracted from the supplied gpg key
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.