Skip to content

Instantly share code, notes, and snippets.

@idiotandrobot
Created September 29, 2023 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idiotandrobot/5292eb4b87f347598d3fddc46e948258 to your computer and use it in GitHub Desktop.
Save idiotandrobot/5292eb4b87f347598d3fddc46e948258 to your computer and use it in GitHub Desktop.
#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