mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-04-29 22:24:31 +02:00
ci: Use semi-transparent Discord embed color
This commit is contained in:
parent
23a89414cb
commit
39448feac7
26
.github/workflows/discord_ping_on_release.yml
vendored
26
.github/workflows/discord_ping_on_release.yml
vendored
@ -10,13 +10,33 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: sarisia/actions-status-discord@v1
|
- uses: sarisia/actions-status-discord@v1
|
||||||
if: always()
|
if: always()
|
||||||
|
id: webhook # set id to reference output payload later
|
||||||
with:
|
with:
|
||||||
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
ack_no_webhook: true # suppress warning
|
||||||
username: ReVanced Extended
|
|
||||||
color: 0xff5252
|
|
||||||
nodetail: true
|
nodetail: true
|
||||||
notimestamp: true
|
notimestamp: true
|
||||||
|
|
||||||
|
username: ReVanced Extended
|
||||||
content: "<@&1271197877724643461>"
|
content: "<@&1271197877724643461>"
|
||||||
title: "Patches `${{ github.event.release.tag_name }}` has been released!"
|
title: "Patches `${{ github.event.release.tag_name }}` has been released!"
|
||||||
description: |
|
description: |
|
||||||
Click [here](${{ github.event.release.html_url }}) to read the changelog and release notes.
|
Click [here](${{ github.event.release.html_url }}) to read the changelog and release notes.
|
||||||
|
|
||||||
|
- run: npm install axios
|
||||||
|
- uses: actions/github-script@v7
|
||||||
|
env:
|
||||||
|
WEBHOOK_PAYLOAD: ${{ steps.webhook.outputs.payload }}
|
||||||
|
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const axios = require("axios")
|
||||||
|
|
||||||
|
const { WEBHOOK_PAYLOAD, WEBHOOK_URL } = process.env
|
||||||
|
|
||||||
|
const payload = JSON.parse(WEBHOOK_PAYLOAD)
|
||||||
|
|
||||||
|
// remove the color field to make it transparent
|
||||||
|
delete payload.embeds[0].color
|
||||||
|
|
||||||
|
// send to Discord
|
||||||
|
axios.post(WEBHOOK_URL, payload)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user