Skip to content

Nightly Snapshot

Nightly Snapshot #214

Workflow file for this run

name: Nightly Snapshot
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
snapshot:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- run: pnpm install
- name: Set up environment variables
run: echo "HELIUS_ENDPOINT=${{ secrets.HELIUS_ENDPOINT }}" >> $GITHUB_ENV
- name: Run snapshot
run: pnpm snapshot
- name: Check for changes
id: git-check
run: |
git diff --exit-code || echo "changes=true" >> $GITHUB_ENV
- name: Commit and push if changed
if: env.changes == 'true'
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add .
git commit -m "Automated snapshot update"
git push