| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- name: Check Domain Availability
- on:
- # manual trigger only
- workflow_dispatch:
- jobs:
- check:
- name: Check (shard ${{ matrix.shard }}/4)
- runs-on: ubuntu-slim
- strategy:
- # Keep every shard running even if one hits a fatal error, so we still
- # collect dead domains from the rest.
- fail-fast: false
- matrix:
- # 4 shards -> 4 runners, each lands on a different Azure region / egress
- # IP, spreading DoH load and reducing per-server rate limiting.
- shard: [0, 1, 2, 3]
- steps:
- # - name: Tune GitHub-hosted runner network
- # # https://github.com/actions/runner-images/issues/1187
- # uses: smorimoto/tune-github-hosted-runner-network@v1
- - uses: actions/checkout@v6
- with:
- persist-credentials: false
- - uses: pnpm/action-setup@v5
- with:
- run_install: false
- - uses: actions/setup-node@v6
- with:
- node-version-file: ".node-version"
- cache: "pnpm"
- - name: Get current date
- id: date
- run: |
- echo "date=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT
- echo "year=$(date +'%Y')" >> $GITHUB_OUTPUT
- echo "month=$(date +'%m')" >> $GITHUB_OUTPUT
- echo "day=$(date +'%d')" >> $GITHUB_OUTPUT
- echo "hour=$(date +'%H')" >> $GITHUB_OUTPUT
- echo "minute=$(date +'%M')" >> $GITHUB_OUTPUT
- echo "second=$(date +'%S')" >> $GITHUB_OUTPUT
- - name: Restore cache.db
- uses: actions/cache/restore@v5
- id: cache-db-restore
- with:
- path: |
- .cache
- # Cache is keyed per shard: each shard checks a disjoint subset of
- # domains, so their DoH/whois caches don't overlap.
- key: ${{ runner.os }}-shard${{ matrix.shard }}-v3-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }} ${{ steps.date.outputs.hour }}:${{ steps.date.outputs.minute }}:${{ steps.date.outputs.second }}
- # If source files changed but packages didn't, rebuild from a prior cache.
- restore-keys: |
- ${{ runner.os }}-shard${{ matrix.shard }}-v3-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }} ${{ steps.date.outputs.hour }}:${{ steps.date.outputs.minute }}:
- ${{ runner.os }}-shard${{ matrix.shard }}-v3-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }} ${{ steps.date.outputs.hour }}:
- ${{ runner.os }}-shard${{ matrix.shard }}-v3-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }}
- ${{ runner.os }}-shard${{ matrix.shard }}-v3-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-
- ${{ runner.os }}-shard${{ matrix.shard }}-v3-${{ steps.date.outputs.year }}-
- ${{ runner.os }}-shard${{ matrix.shard }}-v3-
- - run: pnpm config set --location=global minimumReleaseAge 0
- - run: pnpm install
- - run: pnpm run node Build/validate-domain-alive.ts
- env:
- DEBUG: domain-alive:dead-domain,domain-alive:error:*
- SHARD_INDEX: ${{ matrix.shard }}
- SHARD_TOTAL: 4
- - name: Cache cache.db
- if: always()
- uses: actions/cache/save@v5
- with:
- path: |
- .cache
- key: ${{ runner.os }}-shard${{ matrix.shard }}-v3-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }} ${{ steps.date.outputs.hour }}:${{ steps.date.outputs.minute }}:${{ steps.date.outputs.second }}
|