Post QoTD #628
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: Post QoTD | |
on: | |
schedule: | |
# https://crontab.guru/#59_15_*_*_* | |
- cron: "59 15 * * *" | |
workflow_dispatch: | |
jobs: | |
post: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
if: github.repository == 'FurryRefuge/qotd' && github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- run: npm ci --production | |
- run: npm run lint-qotds | |
- run: npm run post-qotd -- -ci | |
env: | |
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} | |
- run: git config user.name "Paw Bot" | |
- run: git config user.email "developers@paw.bot" | |
- continue-on-error: true | |
run: git add data/qotds.json | |
- run: | | |
(git commit -m 'chore: 🤖 update qotd microdata' && git push) || echo "nothing to commit" |