Skip to content

Instantly share code, notes, and snippets.

@idiotandrobot
Created September 29, 2023 14:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#runs-on: windows-latest
# steps:
# - uses: actions/checkout@v3.5.2 # https://github.com/marketplace/actions/checkout
- name: Get Head Commit Message
id: get_head_commit
shell: pwsh
run: |
$Message = git log --format=%B -n 1 HEAD
Write-Output "title=$($Message | Select -First 1)" >> $Env:GITHUB_OUTPUT
Write-Output "body=$($Message | Select -Skip 1)" >> $Env:GITHUB_OUTPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment