Update discord action (#482)

* 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
This commit is contained in:
Robbie Davis 2021-08-11 15:42:23 -04:00 committed by GitHub
parent e805632151
commit 58d634c07d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -87,8 +87,10 @@ jobs:
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Notify Discord
uses: Sniddl/discord-commits@v1.3
uses: rjstone/discord-webhook-notify@v1
with:
webhook: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}
message: "A new nightly build v${{steps.get-version.outputs.assembly-version}} has been released for docker.\nhttps://hub.docker.com/r/kizaing/kavita/tags?page=1&ordering=last_updated"
embed: '{ "title": "${{ github.event.inputs.title }}", "description": "${{ github.event.inputs.body }}", "url": "{{ commit.url }}", "author": { "name": "{{ commit.author.name }} ({{ commit.author.username }})", "icon_url": "https://avatars.io/gravatar/{{ commit.author.email }}"} }'
severity: info
description: ${{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

@ -160,4 +160,4 @@ jobs:
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Build Stable Docker
token: ${{ secrets.REPO_GHA_PAT }}
token: ${{ secrets.REPO_GHA_PAT }}