Fresh NHAI data fetch for June 2026 — 1,392 plazas (+3 vs May) #30
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: Create Release on Data Update | |
| on: | |
| push: | |
| paths: | |
| - 'data/latest.json' | |
| workflow_dispatch: # Allow manual triggering for testing | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Get current date | |
| id: date | |
| run: | | |
| echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
| echo "month_year=$(date +'%m-%Y')" >> $GITHUB_OUTPUT | |
| - name: Get latest data info | |
| id: data-info | |
| run: | | |
| if [ -f data/latest.json ]; then | |
| TOTAL_PLAZAS=$(cat data/latest.json | python3 -c "import sys, json; print(len(json.load(sys.stdin)))") | |
| NHAI_COUNT=$(cat data/latest.json | python3 -c "import sys, json; data=json.load(sys.stdin); print(sum(1 for p in data if p.get('data_source')=='nhai'))") | |
| STATE_COUNT=$(cat data/latest.json | python3 -c "import sys, json; data=json.load(sys.stdin); print(sum(1 for p in data if p.get('data_source')=='state'))") | |
| echo "TOTAL_PLAZAS=$TOTAL_PLAZAS" >> $GITHUB_OUTPUT | |
| echo "NHAI_COUNT=$NHAI_COUNT" >> $GITHUB_OUTPUT | |
| echo "STATE_COUNT=$STATE_COUNT" >> $GITHUB_OUTPUT | |
| else | |
| echo "TOTAL_PLAZAS=0" >> $GITHUB_OUTPUT | |
| echo "NHAI_COUNT=0" >> $GITHUB_OUTPUT | |
| echo "STATE_COUNT=0" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.date.outputs.date }} | |
| name: Toll Plazas Data - ${{ steps.date.outputs.date }} | |
| body: | | |
| India Toll Plazas Dataset Update | |
| **Data Summary:** | |
| - Total Toll Plazas: ${{ steps.data-info.outputs.TOTAL_PLAZAS }} | |
| - NHAI Toll Plazas: ${{ steps.data-info.outputs.NHAI_COUNT }} | |
| - State Highway Toll Plazas: ${{ steps.data-info.outputs.STATE_COUNT }} | |
| **Download:** | |
| - [Latest JSON](https://raw.githubusercontent.com/${{ github.repository }}/main/data/latest.json) | |
| - [Versioned Data](https://github.com/${{ github.repository }}/tree/main/data/${{ steps.date.outputs.month_year }}) | |
| **Update Date:** ${{ steps.date.outputs.date }} | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |