Update Databases #97
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: Update Databases | |
| on: | |
| schedule: | |
| # Every 48 hours | |
| - cron: "0 0 */2 * *" | |
| workflow_dispatch: | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| name: Update Geolite2 Database | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "latest" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Update Geolite2 Database | |
| run: "npm run download:geo -- --chunk-size 250000 --split-files" | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_API_TOKEN_READ_D1: ${{ secrets.CLOUDFLARE_API_TOKEN_READ_D1 }} | |
| CLOUDFLARE_D1_DATABASE_ID: ${{ secrets.CLOUDFLARE_D1_DATABASE_ID }} | |
| MAXMIND_ACCOUNT_ID: ${{ secrets.MAXMIND_ACCOUNT_ID }} | |
| MAXMIND_LICENSE_KEY: ${{ secrets.MAXMIND_LICENSE_KEY }} |