Skip to content

Update discord.yml

Update discord.yml #4

Workflow file for this run

name: Create and Send JSON to Discord
on:
push:
branches:
- main
jobs:
generate-json:
runs-on: ubuntu-latest
steps:
- name: Create File
uses: actions/checkout@v2
- name: Generate JSON file
run: |

Check failure on line 16 in .github/workflows/discord.yml

View workflow run for this annotation

GitHub Actions / Create and Send JSON to Discord

Invalid workflow file

The workflow is not valid. .github/workflows/discord.yml (Line: 16, Col: 14): An expression was expected
echo '{
"content": null,
"embeds": [
{
"title": "New Release 🧰",
"color": 6291288,
"fields": [
{
"name": "Commit ⚡",
"value": "Message » `${{ github.event.head_commit.message }}`\n\nCommit SHA » `${{ github.sha }}`"
},
{
"name": "Workflow ☢️",
"value": "Branch » `${{ github.ref }}`\n\nWorkflow Runtime » `${{ }}`"
},
{
"name": "Release 📦",
"value": "Download » `${{ }}`"
}
],
"author": {
"name": "${{ github.actor }}"
},
"footer": {
"text": "[Main Repository 🔑](https://github.com/Hyphonic/Conquest)"
}
}
],
"attachments": []
}' > file.json
send-webhook:
runs-on: ubuntu-latest
needs: generate-json
steps:
- uses: actions/checkout@v2
- name: Send Webhook
uses: tsickert/discord-webhook@v6.0.0
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
raw-data: file.json
cleanup:
runs-on: ubuntu-latest
needs: send-webhook
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Delete File
run: rm file.json