Update discord action (#486)

* Updating docker action

* adding version to message

* adding way to get PR title and body

* Adding input pass to workflows

Workflow dispatches may not get push header info. Switching logic to pass needed title and body info through just in case.

* adding token

The description on this action is awful, it didn't mention needing a token. I found this solution from the repo's issues

* parsing pr body

* Updating parsing

* Updating docker workflow

* Reverting back to default variables

* fixing syntax error

* removing heading syntax

* updating parse

* Updating parsing

* Updating docker workflow

* trying to remove newline
This commit is contained in:
Robbie Davis 2021-08-12 11:51:17 -04:00 committed by GitHub
parent db74155a70
commit ab9c40ddc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -90,7 +90,7 @@ jobs:
uses: rjstone/discord-webhook-notify@v1
with:
severity: info
description: ${{steps.get-version.outputs.assembly-version}}
description: v${{steps.get-version.outputs.assembly-version}}
details: '${{ github.event.inputs.body }}'
text: A new nightly build has been released for docker.
webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}

View File

@ -136,10 +136,9 @@ jobs:
- name: Parse PR body
run: |
body='${{ steps.findPr.outputs.body }}'
newBody="${body//$'\n'/}"
newB="${newBody//$'#'/}"
echo $newB
echo "::set-output name=BODY::$newB"
newBody=$(echo $body | sed ':a;N;$!ba;s/\n/ /g')
echo $newBody
echo "::set-output name=BODY::$newBody"
id: parse-body
- name: If Push to Develop, Trigger Docker Stable