Skip to content

Skyguard Ace does not move. #20655

Skyguard Ace does not move.

Skyguard Ace does not move. #20655

Workflow file for this run

name: discord-issue-linked
on:
issues:
types: [labeled]
jobs:
discord-issue-linked:
if: ${{ github.event.label.name == 'Linked [AC]' }}
runs-on: ubuntu-latest
steps:
- name: Set json
id: json
run: |
# Template json to send as an embed
# jq replaces $var with `jq --arg var <value> "$TEMPLATE"`
TEMPLATE='[{
"title": $title,
"url": $url,
"color": $color,
"description": $desc,
"fields": [
{
"name": $field_name,
"value": $field_value
},
{
"name": $field_name2,
"value": $field_value2
}
]
}]'
echo "DISCORD_EMBEDS=$(jq -nc --arg title "${{ github.event.issue.title }}" --arg url "${{ github.event.issue.html_url }}" --arg color "14649120" --arg desc "A new issue has been linked to the AC Repo" --arg field_name "**Issue Author:**" --arg field_value "[${{ github.event.issue.user.login }}](${{ github.event.issue.user.html_url }})" --arg field_name2 "**Contributor:**" --arg field_value2 "[${{ github.event.sender.login }}](${{ github.event.sender.html_url }})" "$TEMPLATE")" >> $GITHUB_ENV
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/[email protected]