Updating discord workflow (#472)

* 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
This commit is contained in:
Robbie Davis 2021-08-10 22:03:29 -04:00 committed by GitHub
parent 98b8c875f3
commit 347c8a4bef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,12 +133,20 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Parse PR body
run: |
body='${{ steps.findPr.outputs.body }}'
newBody=sed '$!s/$/\\n/' body | tr -d '\n'
echo $newBody
echo "::set-output name=BODY::$newBody"
id: parse-body
- name: If Push to Develop, Trigger Docker Stable
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Build Nightly Docker
token: ${{ secrets.REPO_GHA_PAT }}
inputs: '{ "title": "${{ steps.findPr.outputs.title }}", "body": "${{ steps.findPr.outputs.body }}" }'
inputs: '{ "title": "${{ steps.findPr.outputs.title }}", "body": "${{ steps.parse-body.outputs.BODY }}" }'
stable:
name: Trigger Stable Docker if Main push