Skip to content

Update Table Image

Update Table Image #48

Workflow file for this run

name: Update Table Image
on:
schedule:
- cron: '0 0 * * *' # Daily at midnight
workflow_dispatch:
jobs:
update-image:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm install puppeteer
- name: Create assets directory
run: mkdir -p assets
- name: Capture table
run: node static/thunder/imageCapture.js
- name: Commit and push if changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add assets/table.png
git commit -m "[AUTOMATED] Update table image" || exit 0
git push origin HEAD:main