Update for linux #76
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Send stats to Discord. | |
on: | |
schedule: | |
# Run every day of the week at 6am | |
- cron: '0 6 * * *' | |
push: | |
branches: | |
- main | |
- convert-to-swift | |
jobs: | |
build: | |
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\": \"AuroraEditor\", | |
\"title\": \"Aurora Editor Stats\", | |
\"description\": \"These are the statistics for [AuroraEditor/%s](https://github.com/AuroraEditor/%s),\r\nupdated on %s.\", | |
\"url\": \"https://auroraeditor.com\" | |
} | |
}" > config.json | |
- name: Run & Send | |
run: swift application.swift |