Sync all coins once a day #132
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: Sync all coins once a day | |
on: | |
schedule: | |
- cron: "0 4 */1 * *" # Run at 04:00 UTC every day | |
workflow_dispatch: | |
jobs: | |
sync_all_coins: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install modules | |
run: yarn --ignore-engines | |
- name: Run sync_all_coins.js | |
env: | |
MONGODB_URI: ${{ secrets.MONGODB_URI }} | |
CRYPTOCOMPARE_API_KEY: ${{ secrets.CRYPTOCOMPARE_API_KEY }} | |
COINCAP_API_KEY: ${{ secrets.COINCAP_API_KEY }} | |
run: node scripts/sync_all_coins.js |