mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-18 17:18:11 +00:00
Refactor issue label workflow for Discord notifications (#3950)
This commit is contained in:
1 parent
e202239e66
commit
8b2f26535d
1 file changed
+10
-28
@@ -1,33 +1,15 @@
|
|||||||
name: Issue labels
|
name: Issues notify
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [labeled, reopened, closed, deleted]
|
types:
|
||||||
|
- opened
|
||||||
env:
|
- labeled
|
||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_ISSUES_WEBHOOK }}
|
- unlabeled
|
||||||
|
- closed
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
labelNotify:
|
notify:
|
||||||
runs-on: ubuntu-latest
|
uses: itzg/github-workflows/.github/workflows/issues-notify-discord.yml@main
|
||||||
timeout-minutes: 5
|
secrets:
|
||||||
steps:
|
discordWebhook: "${{secrets.DISCORD_ISSUES_WEBHOOK}}"
|
||||||
- name: notify on label
|
|
||||||
if: >
|
|
||||||
github.event.label.name == 'enhancement'
|
|
||||||
|| github.event.label.name == 'bug'
|
|
||||||
|| github.event.label.name == 'help wanted'
|
|
||||||
|| github.event.label.name == 'priority/high'
|
|
||||||
|| github.event.label.name == 'question'
|
|
||||||
|| github.event.label.name == 'status/waiting on upstream'
|
|
||||||
uses: Ilshidur/action-discord@master
|
|
||||||
with:
|
|
||||||
args: "[${{ github.event.issue.title }} (#${{ github.event.issue.number }})](<${{ github.event.issue.html_url }}>) added `${{ github.event.label.name }}` label"
|
|
||||||
- name: notify on action change
|
|
||||||
if: >
|
|
||||||
github.event.action == 'closed'
|
|
||||||
|| github.event.action == 'reopened'
|
|
||||||
|| github.event.action == 'deleted'
|
|
||||||
uses: Ilshidur/action-discord@master
|
|
||||||
with:
|
|
||||||
args: "[${{ github.event.issue.title }} (#${{ github.event.issue.number }})](<${{ github.event.issue.html_url }}>) has been `${{ github.event.action }}` by `${{ github.event.sender.login }}`"
|
|
||||||
Reference in new issue
Block a user