Refresh API limit Daily #144
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: Refresh API limit Daily | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # daily at midnight UTC | |
| workflow_dispatch: | |
| jobs: | |
| refresh_usage_count: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| steps: | |
| - name: Set timezone | |
| run: | | |
| sudo timedatectl set-timezone Asia/Kolkata | |
| sudo timedatectl set-ntp true | |
| timedatectl | |
| - name: Checkout stage branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: stage | |
| - name: Install Mongoose | |
| run: npm install mongoose --legacy-peer-deps | |
| - name: Run refreshUsageCount script | |
| env: | |
| MONGO_URL: ${{ secrets.PROD_MONGO_URL }} | |
| run: node ./packages/app/scripts/refreshUsageCount.js |