Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-commit

GitHub Action

Git Message

v1.2.0

Git Message

git-commit

Git Message

Get the git message associated with the current SHA

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Git Message

uses: kceb/[email protected]

Learn more about this action in kceb/git-message-action

Choose a version

Git Message Action

This action outputs the git message associated with the current SHA

Inputs

sha

Optional The sha of the commit to get the message for. Defaults to the GITHUB_SHA environment variable set by Github.

Outputs

git-message

The git-message

title

The title of the git-message, i.e. the first line

body

The body of the git-message, i.e. everything but the first line

Example usage

Without SHA:

uses: kceb/git-message-action@v1

With specified SHA:

uses: kceb/git-message-action@v1
with:
  sha: '2905893ab6e5f2644201c2abc04e3d83bf317d9b'

For more info on how to use outputs: https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#steps-context