A composite action for committing the current staged content.
| Name | Description | Default |
|---|---|---|
title (*) |
The title of the commit message | N/A |
body |
The body of the commit message | "" |
user-email |
The email of the user to commit as | "octocat@users.noreply.github.com" |
user-name |
The default user to commit as | "Octocat" |
Note: (*) marks required inputs
| Name | Description |
|---|---|
sha1 |
The SHA1 of the newly created commit |
sha1-short |
The short/succinct SHA1 of the newly created commit |
Here is a very basic example of how to use the git/commit composite action
in a project (placeholders are used in place of real inputs):
run:
example-job:
# ...
steps:
# ...
- name: Create a git commit
id: git-commit # only necessary if using this action's output(s)
uses: bitwizeshift/actions-github/git/commit@v1
with:
# Required inputs
title: TITLE
# Optional inputs
body: BODY
user-email: USER_EMAIL
user-name: USER_NAME
# ...
- name: Uses "Create a git commit" Outputs
uses: example-actions/use-git-commit@v3 # illustrative
with:
use-sha1: ${{ steps.git-commit.outputs.sha1 }}
use-sha1-short: ${{ steps.git-commit.outputs.sha1-short }}