SO -> Discord Notifier #244
This file contains hidden or 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: SO -> Discord Notifier | |
on: | |
schedule: | |
# Runs at 00:00 UTC and 12:00 UTC | |
- cron: '0 */12 * * *' | |
workflow_dispatch: # Allow manual runs | |
jobs: | |
notify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
# Persist credentials so git push works | |
persist-credentials: true | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Install dependencies | |
run: npm ci | |
- name: Git Setup | |
run: | | |
git config user.name 'WebdriverIO Discord Bot' | |
git config user.email '[email protected]' | |
- name: Run SO notifier | |
env: | |
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }} | |
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} | |
TAG_TO_MONITOR: ${{ secrets.TAG_TO_MONITOR }} | |
STACKEXCHANGE_KEY: ${{ secrets.STACKEXCHANGE_KEY }} | |
run: npm run start |