Updating docker workflow (#467)
* 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.
This commit is contained in:
parent
33dfb70f13
commit
9e52316b23
2 changed files with 19 additions and 7 deletions
21
.github/workflows/nightly-docker.yml
vendored
21
.github/workflows/nightly-docker.yml
vendored
|
@ -2,7 +2,15 @@ name: Build Nightly Docker
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
inputs:
|
||||
title:
|
||||
description: "PR Title"
|
||||
required: true
|
||||
default: ""
|
||||
body:
|
||||
description: "PR Body"
|
||||
required: true
|
||||
default: ""
|
||||
jobs:
|
||||
docker:
|
||||
name: Building Nightly Docker
|
||||
|
@ -79,10 +87,9 @@ jobs:
|
|||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
- name: Notify Discord
|
||||
uses: rjstone/discord-webhook-notify@v1
|
||||
uses: Sniddl/discord-commits@v1.3
|
||||
with:
|
||||
severity: info
|
||||
description: ${{ github.event.body }}
|
||||
details: 'https://hub.docker.com/r/kizaing/kavita/tags?page=1&ordering=last_updated'
|
||||
text: A new nightly build has been released for docker.
|
||||
webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}
|
||||
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 }}"} }'
|
||||
last-commit-only: true
|
||||
|
|
5
.github/workflows/sonar-scan.yml
vendored
5
.github/workflows/sonar-scan.yml
vendored
|
@ -127,11 +127,16 @@ jobs:
|
|||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
|
||||
steps:
|
||||
|
||||
- name: Find Current Pull Request
|
||||
uses: jwalton/gh-find-current-pr@v1.0.2
|
||||
id: findPr
|
||||
|
||||
- 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 }}" }'
|
||||
|
||||
stable:
|
||||
name: Trigger Stable Docker if Main push
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue