From 347c8a4bef4084794542c96193bd52bddc7b48bc Mon Sep 17 00:00:00 2001 From: Robbie Davis Date: Tue, 10 Aug 2021 22:03:29 -0400 Subject: [PATCH] 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 --- .github/workflows/sonar-scan.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml index 82b8796c1..538265a94 100644 --- a/.github/workflows/sonar-scan.yml +++ b/.github/workflows/sonar-scan.yml @@ -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