Skip to content

Send summary to Discord. #481

Send summary to Discord.

Send summary to Discord. #481

Workflow file for this run

name: Send summary to Discord.
on:
schedule:
# Run every day of the week at 6am
- cron: '0 6 * * *'
workflow_dispatch:
jobs:
aurora_discord_summary:
if: github.repository_owner == 'AuroraEditor'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create config.json
env:
WEBHOOK: ${{ secrets.DISCORD_HOOK }}
ROLE: ${{ secrets.DISCORD_ROLE }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "{
\"settings\": {
\"stats\": [
\"stars\",
\"forks\",
\"watchers\",
\"open_issues\"
]
},
\"github\": {
\"url\": \"https://api.github.com/users/AuroraEditor/repos\",
\"token\": \"$TOKEN\",
\"repos\": [
\"AuroraEditor\",
\"auroraeditor.com\"
]
},
\"discord\": {
\"webhook\": \"$WEBHOOK\",
\"tag\": $ROLE,
\"tagtreshold\": 24,
\"username\": \"Aurora Care Bear\",
\"avatar\": \"https://avatars.githubusercontent.com/u/123369531?v=4\",
\"title\": \"Aurora Editor Stats\",
\"description\": \"These are the statistics for [%@](https://github.com/%@),\r\nupdated on %@.\",
\"url\": \"https://auroraeditor.com\"
}
}" > config.json
- name: Run Aurora Discord Summary
run: swift AuroraDiscordSummary.swift