GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Automation and CI / globalgrid2050 / .github/workflows

GlobalGrid2050 Count Lines Workflow and 14 more files

A GitHub Actions workflow that builds and publishes the site. Runs on a schedule and by hand.

697 lines of YAML from globalgrid2050, in 15 files. Topic: Automation and CI. Section 1711 of 2044.

Cut 2026-12-06T03:07:51+00:00. A copy for reading; the repository at the stated commit is the source.

In the State lines below, domain stage, users and canonical status are rule-based first approximations from code and path evidence (rules explore-agent-rules-v1), not observed facts: the rules.

In this section

  1. GlobalGrid2050 Build Generation Fuelhh Browser Slim Workflow automation · globalgrid2050 / .github/workflows/build_generation_fuelhh_browser_slim.yml lines 1–64
  2. GlobalGrid2050 Clone V3 to V4 Once Workflow automation · globalgrid2050 / .github/workflows/clone-v3-to-v4-once.yml lines 1–30
  3. GlobalGrid2050 Clone V4 to V5 Workflow automation · globalgrid2050 / .github/workflows/clone-v4-to-v5.yml lines 1–21
  4. GlobalGrid2050 Clone Generation History V6 to V6 2 Workflow automation · globalgrid2050 / .github/workflows/clone_generation_history_v6_to_v6_2.yml lines 1–38
  5. GlobalGrid2050 Clone UK Energy Tracking V2 Workflow automation · globalgrid2050 / .github/workflows/clone_uk_energy_tracking_v2.yml lines 1–39
  6. GlobalGrid2050 Clone UK Energy Tracking V2 to V3 Workflow automation · globalgrid2050 / .github/workflows/clone_uk_energy_tracking_v2_to_v3.yml lines 1–31
  7. GlobalGrid2050 Clone UK Energy Tracking V4 to V5 Workflow automation · globalgrid2050 / .github/workflows/clone_uk_energy_tracking_v4_to_v5.yml lines 1–38
  8. GlobalGrid2050 Compare UK Energy V5 V6 Workflow automation · globalgrid2050 / .github/workflows/compare_uk_energy_v5_v6.yml lines 1–35
  9. GlobalGrid2050 Compare UK Energy V5 V6 V2 Workflow automation · globalgrid2050 / .github/workflows/compare_uk_energy_v5_v6_v2.yml lines 1–25
  10. GlobalGrid2050 Compare UK Energy V5 V6 V3 Workflow automation · globalgrid2050 / .github/workflows/compare_uk_energy_v5_v6_v3.yml lines 1–27
  11. GlobalGrid2050 Count Lines Workflow automation · globalgrid2050 / .github/workflows/count-lines.yml lines 1–108
  12. GlobalGrid2050 Create V8 Battery Energy Storage System (BESS) Electrical Topology Review Workflow automation · globalgrid2050 / .github/workflows/create-v8-bess-electrical-topology-review.yml lines 1–57
  13. GlobalGrid2050 Create V8 Battery Energy Storage System (BESS) Pcs Standalone Workflow automation · globalgrid2050 / .github/workflows/create-v8-bess-pcs-standalone.yml lines 1–66
  14. GlobalGrid2050 Create UK Energy Tracking V4 Workflow automation · globalgrid2050 / .github/workflows/create_uk_energy_tracking_v4.yml lines 1–23
  15. GlobalGrid2050 Datacentre News Workflow automation · globalgrid2050 / .github/workflows/datacentre-news.yml lines 1–95

GlobalGrid2050 Build Generation Fuelhh Browser Slim Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/build_generation_fuelhh_browser_slim.yml · lines 1–64 of 64 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'generation'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Build Generation Daily Fuelhh Browser Slim (`scripts/build_generation_daily_fuelhh_browser_slim.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Build Generation Daily Fuelhh Browser Slim (workflow run)
Used by
none found
Produces
none declared
Defines here
Build Generation FUELHH Browser Slim
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/build_generation_fuelhh_browser_slim.yml:1-64 · blob 6a39b0c2a1ece49cb6ab95ab802a0ab7e98ad20e · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Build Generation FUELHH Browser Slim

on:
  workflow_dispatch:
    inputs:
      commit:
        description: Commit slim browser outputs
        required: false
        default: 'true'
      max_bytes:
        description: Maximum browser JSON size in bytes
        required: false
        default: '3000000'
permissions:
  contents: write

concurrency:
  group: fuelhh-browser-slim
  cancel-in-progress: false

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    env:
      COMMIT_OUTPUTS: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.commit || 'true' }}
      MAX_BYTES: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.max_bytes || '3000000' }}
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Build slim browser file
        run: python scripts/build_generation_daily_fuelhh_browser_slim.py --apply --max-bytes "$MAX_BYTES"
      - name: Upload reports
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: fuelhh-browser-slim-reports
          path: |
            uk_energy_tracking_v6/generation_history/generation_daily_fuelhh_browser_slim.json
            uk_energy_tracking_v6/generation_history/manifests/generation_daily_fuelhh_browser_slim.manifest.json
            data_science_protocol/audit_reports/FUELHH_BROWSER_SLIM_LATEST.md
            data_science_protocol/audit_reports/json/FUELHH_BROWSER_SLIM_LATEST.json
      - name: Commit outputs
        if: env.COMMIT_OUTPUTS != 'false'
        shell: bash
        run: |
          set -euo pipefail
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"
          git add uk_energy_tracking_v6/generation_history/generation_daily_fuelhh_browser_slim.json || true
          git add uk_energy_tracking_v6/generation_history/manifests/generation_daily_fuelhh_browser_slim.manifest.json || true
          git add data_science_protocol/audit_reports/FUELHH_BROWSER_SLIM_LATEST.md || true
          git add data_science_protocol/audit_reports/json/FUELHH_BROWSER_SLIM_LATEST.json || true
          if git diff --cached --quiet; then
            echo "No browser slim changes to commit."
            exit 0
          fi
          git commit -m "gridbot: build FUELHH browser slim file"
          git pull --rebase origin "${GITHUB_REF_NAME}"
          git push origin HEAD:"${GITHUB_REF_NAME}"

GlobalGrid2050 Clone V3 to V4 Once Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/clone-v3-to-v4-once.yml · lines 1–30 of 30 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Clone V3 to V4 (`scripts/clone_v3_to_v4.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Clone V3 to V4 (workflow run)
Used by
none found
Produces
none declared
Defines here
Clone V3 to V4 Once
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/clone-v3-to-v4-once.yml:1-30 · blob 8593a77c0f802958a2e4fe0b1093179ee89e56fc · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: Clone V3 to V4 Once

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  clone-v3-to-v4:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Clone V3 folder into V4
        run: python scripts/clone_v3_to_v4.py

      - name: Commit V4 clone
        run: |
          git config user.name "GridBot"
          git config user.email "gridbot@users.noreply.github.com"
          git add solar-bess-topology-v4 gridbot_reports/v4_clone_from_v3_report.md
          if git diff --cached --quiet; then
            echo "No V4 clone changes to commit."
          else
            git commit -m "Clone V3 app into V4 safety baseline"
            git push
          fi

GlobalGrid2050 Clone V4 to V5 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/clone-v4-to-v5.yml · lines 1–21 of 21 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Clone V4 to V5 (`scripts/clone_v4_to_v5.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Clone V4 to V5 (workflow run)
Used by
none found
Produces
none declared
Defines here
Clone V4 to V5
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/clone-v4-to-v5.yml:1-21 · blob 013b94930caf89aa1723fe284b0ac11871c5af57 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: Clone V4 to V5

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  clone:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Run clone script
        run: python scripts/clone_v4_to_v5.py
      - name: Commit generated V5 files
        uses: stefanzweifel/git-auto-commit-action@v5
        with:
          commit_message: Clone V4 to V5 development version
          file_pattern: solar-bess-topology-v5/** gridbot_reports/v5_clone_from_v4_report.md

GlobalGrid2050 Clone Generation History V6 to V6 2 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/clone_generation_history_v6_to_v6_2.yml · lines 1–38 of 38 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'generation'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Clone Generation History V6 to V6 2 (`scripts/clone_generation_history_v6_to_v6_2.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Clone Generation History V6 to V6 2 (workflow run)
Used by
none found
Produces
none declared
Defines here
Clone Generation History V6 to V6 2
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/clone_generation_history_v6_to_v6_2.yml:1-38 · blob 827081e6064adb5293b424e224b572c154cc2d30 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Clone Generation History V6 to V6 2

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  clone:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Clone generation history V6 to V6 2
        run: python scripts/clone_generation_history_v6_to_v6_2.py

      - name: Commit generation history V6 2 clone
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          set -e
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git add uk_energy_tracking_v6_2/generation_history index.html gridbot_reports/clone_generation_history_v6_to_v6_2.md
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Clone Generation History V6 to V6 2"
            git pull --rebase https://${PAT}@github.com/${{ github.repository }}.git main
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No Generation History V6 2 clone changes to commit"
          fi

GlobalGrid2050 Clone UK Energy Tracking V2 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/clone_uk_energy_tracking_v2.yml · lines 1–39 of 39 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Clone UK Energy Tracking V2 (`scripts/clone_uk_energy_tracking_v2.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Clone UK Energy Tracking V2 (workflow run)
Used by
none found
Produces
none declared
Defines here
clone-uk-energy-tracking-v2
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/clone_uk_energy_tracking_v2.yml:1-39 · blob be53763287a9121d556df3a0eb789af59b3422e1 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: clone-uk-energy-tracking-v2

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  clone:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Create V2 clone
        run: python scripts/clone_uk_energy_tracking_v2.py

      - name: Commit V2 clone
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git add uk_energy_tracking_v2/index.md
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Create UK energy tracker V2 clone"
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No changes to commit"
          fi

GlobalGrid2050 Clone UK Energy Tracking V2 to V3 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/clone_uk_energy_tracking_v2_to_v3.yml · lines 1–31 of 31 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Clone UK Energy Tracking V2 to V3 (`scripts/clone_uk_energy_tracking_v2_to_v3.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Clone UK Energy Tracking V2 to V3 (workflow run)
Used by
none found
Produces
none declared
Defines here
clone_uk_energy_tracking_v2_to_v3
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/clone_uk_energy_tracking_v2_to_v3.yml:1-31 · blob 2fa7dfb242829d4eda2065d92400b35afd22e49d · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: clone_uk_energy_tracking_v2_to_v3

on:
  workflow_dispatch:
jobs:
  clone-v3:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Run V3 clone script
        run: python scripts/clone_uk_energy_tracking_v2_to_v3.py

      - name: Commit and push V3 clone
        run: |
          git config --global user.name "GridBot"
          git config --global user.email "gridbot@globalgrid2050.com"
          git add .
          git diff --cached --quiet && echo "No changes to commit" && exit 0
          git commit -m "GridBot: clone UK energy tracker V2 to V3"
          git pull --rebase origin main
          git push origin main

GlobalGrid2050 Clone UK Energy Tracking V4 to V5 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/clone_uk_energy_tracking_v4_to_v5.yml · lines 1–38 of 38 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Clone UK Energy Tracking V4 to V5 (`scripts/clone_uk_energy_tracking_v4_to_v5.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Clone UK Energy Tracking V4 to V5 (workflow run)
Used by
none found
Produces
none declared
Defines here
Clone UK Energy Tracking V4 to V5
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/clone_uk_energy_tracking_v4_to_v5.yml:1-38 · blob 5dc5e15b38620c84ba8e9c9f6832820c2e8661e5 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: Clone UK Energy Tracking V4 to V5

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  clone:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Clone V4 to V5
        run: python scripts/clone_uk_energy_tracking_v4_to_v5.py

      - name: Commit V5 clone
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          set -e
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git add uk_energy_tracking_v5 index.html gridbot_reports/clone_uk_energy_tracking_v4_to_v5.md
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Clone UK Energy Tracking V4 to V5"
            git pull --rebase https://${PAT}@github.com/${{ github.repository }}.git main
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No V5 clone changes to commit"
          fi

GlobalGrid2050 Compare UK Energy V5 V6 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/compare_uk_energy_v5_v6.yml · lines 1–35 of 35 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Compare UK Energy V5 V6 (`scripts/compare_uk_energy_v5_v6.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Compare UK Energy V5 V6 (workflow run)
Used by
none found
Produces
none declared
Defines here
Compare UK Energy Tracking V5 and V6
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/compare_uk_energy_v5_v6.yml:1-35 · blob c630d142d6b4c3329edd97ffc801ea8f4218f89b · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: Compare UK Energy Tracking V5 and V6

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  compare:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Generate V5 V6 comparison report
        run: python scripts/compare_uk_energy_v5_v6.py

      - name: Commit comparison report
        run: |
          git config user.name "GridBot"
          git config user.email "gridbot@users.noreply.github.com"
          git add uk_energy_tracking_v6/V5_V6_COMPARISON_REPORT.md
          if git diff --cached --quiet; then
            echo "No comparison report changes to commit."
          else
            git commit -m "Generate V5 V6 energy tracker comparison report"
            git push
          fi

GlobalGrid2050 Compare UK Energy V5 V6 V2 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/compare_uk_energy_v5_v6_v2.yml · lines 1–25 of 25 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Compare UK Energy V5 V6 V2 (`scripts/compare_uk_energy_v5_v6_v2.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Compare UK Energy V5 V6 V2 (workflow run)
Used by
none found
Produces
none declared
Defines here
Compare UK Energy V5 V6 V2
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/compare_uk_energy_v5_v6_v2.yml:1-25 · blob 16eb4cb2d6fbf00e223dfec106f698ccbb7fdcc6 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: Compare UK Energy V5 V6 V2

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  compare:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Generate V5 V6 comparison report V2
        run: python scripts/compare_uk_energy_v5_v6_v2.py

      - name: Commit comparison report V2
        run: |
          git config user.name "GridBot"
          git config user.email "gridbot@users.noreply.github.com"
          git add uk_energy_tracking_v6/V5_V6_COMPARISON_REPORT_V2.md
          git diff --cached --quiet && echo "No V5 V6 V2 comparison changes to commit" && exit 0
          git commit -m "Update V5 V6 comparison report V2"
          git push

GlobalGrid2050 Compare UK Energy V5 V6 V3 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/compare_uk_energy_v5_v6_v3.yml · lines 1–27 of 27 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Compare UK Energy V5 V6 V3 (`scripts/compare_uk_energy_v5_v6_v3.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Compare UK Energy V5 V6 V3 (workflow run)
Used by
none found
Produces
none declared
Defines here
Compare UK Energy V5 V6 V3
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/compare_uk_energy_v5_v6_v3.yml:1-27 · blob 6097a51354210b86111284312815676f5822f73b · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: Compare UK Energy V5 V6 V3

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  compare:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Generate V5 V6 comparison report V3
        run: python scripts/compare_uk_energy_v5_v6_v3.py

      - name: Commit comparison report V3
        run: |
          git config user.name "GridBot"
          git config user.email "gridbot@users.noreply.github.com"
          git add uk_energy_tracking_v6/V5_V6_COMPARISON_REPORT_V3.md
          git diff --cached --quiet && echo "No V5 V6 V3 comparison changes to commit" && exit 0
          git commit -m "Update V5 V6 comparison report V3"
          git push

GlobalGrid2050 Count Lines Workflow

A GitHub Actions workflow that builds and publishes the site. Runs on a schedule and by hand.

automationglobalgrid2050 / .github/workflows/count-lines.yml · lines 1–108 of 108 · Entry point

What it does
It builds and publishes its content. Side effects: starts processes.
Inputs & outputs
In: JSON file shard.json.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Named “Count every line in the estate”.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
none found
Used by
none found
Produces
none declared
Defines here
Count every line in the estate
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/count-lines.yml:1-108 · blob 9ed7f9c7491c16a7877d27d7cc98bb0c94d3d2b2 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: Count every line in the estate

# The whole estate, counted in parallel on the MSI's own self-hosted runners.
# The 66 repositories live on that machine, so a cloud runner cannot see them.
#
# Sharding is deterministic and by CONTENT: a blob belongs to the shard given by its own SHA.
# Every shard sees a disjoint slice, no blob is counted twice, and the shards sum exactly to the
# whole. Re-running any single shard reproduces that slice byte for byte.
on:
  workflow_dispatch:
    inputs:
      depth:
        description: 'head | history | authored | entries | all'
        required: false
        default: 'history'
  schedule:
    - cron: '0 4 * * *'

jobs:
  shard:
    runs-on: self-hosted
    timeout-minutes: 360
    strategy:
      # JOB CAP. A 50-lane matrix on the same push that publishes a page can
      # starve the Pages deploy behind it, and then "pushed" is reported as
      # "live" while the site still serves the old bytes. Capped at 12.
      max-parallel: 12
      fail-fast: false
      matrix:
        shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
    steps:
      - name: Count shard ${{ matrix.shard }} of 12
        shell: 'powershell -NoProfile -ExecutionPolicy Bypass -File {0}'
        run: |
          $ErrorActionPreference = 'Stop'
          $depth = '${{ github.event.inputs.depth }}'
          if (-not $depth) { $depth = 'history' }
          $belt  = Join-Path $env:USERPROFILE 'Documents\GitHub\Kuiper-belt'
          $tool  = Join-Path $belt 'tools\count_lines.py'
          # No absolute path and no account name in a public file: derive it
          # from the runner's own profile.
          $roots = (Join-Path $env:USERPROFILE 'Documents/GitHub') -replace '\','/'
          if (-not (Test-Path $tool)) { throw "count_lines.py not found at $tool" }
          $out = Join-Path $env:RUNNER_TEMP "count-${{ matrix.shard }}"
          New-Item -ItemType Directory -Force -Path $out | Out-Null
          Set-Location $belt
          python $tool --roots $roots --depth $depth --shard ${{ matrix.shard }} --of 12 --out $out
          if ($LASTEXITCODE -ne 0) { throw "shard ${{ matrix.shard }} exited $LASTEXITCODE" }
          $f = Get-ChildItem $out -Filter 'counts-*.json' | Select-Object -First 1
          if (-not $f) { throw 'shard produced no counts file' }
          Copy-Item $f.FullName (Join-Path $out 'shard.json') -Force
          Get-Content (Join-Path $out 'shard.json') -Raw | Write-Output

      - name: Keep the shard result
        uses: actions/upload-artifact@v4
        with:
          name: count-shard-${{ matrix.shard }}
          path: ${{ runner.temp }}/count-${{ matrix.shard }}/
          retention-days: 7

  total:
    needs: shard
    if: always()
    runs-on: self-hosted
    timeout-minutes: 30
    steps:
      - name: Collect the shards
        uses: actions/download-artifact@v4
        with:
          pattern: count-shard-*
          path: ${{ runner.temp }}/shards

      - name: Sum them, and refuse if any shard is missing
        shell: 'powershell -NoProfile -ExecutionPolicy Bypass -File {0}'
        run: |
          $ErrorActionPreference = 'Stop'
          $files = Get-ChildItem "$env:RUNNER_TEMP\shards" -Recurse -Filter 'shard.json'
          if ($files.Count -eq 0) { throw 'no shard results: a check that examines nothing refuses' }
          $sum = @{}
          $seen = @()
          foreach ($f in $files) {
            $j = Get-Content $f.FullName -Raw | ConvertFrom-Json
            $seen += $j.shard
            foreach ($k in 'head_lines','head_blobs','head_text_blobs','head_binary_blobs',
                           'history_lines','history_blobs','history_text_blobs','history_binary_blobs',
                           'entries_ever','entry_lines_ever','commits_walked',
                           'authored_added','authored_deleted','commits','tracked_paths') {
              if ($null -ne $j.$k) { $sum[$k] = [int64]$sum[$k] + [int64]$j.$k }
            }
          }
          $missing = 0..11 | Where-Object { $seen -notcontains $_ }
          $sum['shards_seen'] = $files.Count
          $sum['shards_missing'] = ($missing -join ',')
          $sum['complete'] = ($missing.Count -eq 0)
          $sum['asof'] = (Get-Date).ToUniversalTime().ToString('o')
          $json = $sum | ConvertTo-Json -Depth 4
          Write-Output $json
          if ($env:GITHUB_STEP_SUMMARY) {
            Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '```json'
            Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value $json
            Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '```'
          }
          if (Test-Path 'E:\particles-runs') {
            Set-Content -Path 'E:\particles-runs\counts-latest.json' -Value $json -Encoding utf8
          }
          if ($missing.Count -gt 0) {
            throw "INCOMPLETE: shards missing: $($missing -join ',') - the total is not the whole estate"
          }

GlobalGrid2050 Create V8 Battery Energy Storage System (BESS) Electrical Topology Review Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/create-v8-bess-electrical-topology-review.yml · lines 1–57 of 57 · Entry point

What it does
It runs battery storage (BESS) and solar. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage sub33kv_design (path word 'bess'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: battery storage (BESS), solar.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Create V8 Battery Energy Storage System (BESS) Electrical Topology Review (`scripts/create_v8_bess_electrical_topology_review.py`) and GlobalGrid2050 Test Create V8 Battery Energy Storage System (BESS) Electrical Topology Review (`scripts/test_create_v8_bess_electrical_topology_review.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Create V8 Battery Energy Storage System (BESS) Electrical Topology Review (workflow run), GlobalGrid2050 Test Create V8 Battery Energy Storage System (BESS) Electrical Topology Review (workflow run)
Used by
none found
Produces
none declared
Defines here
Create V8 BESS Electrical Topology Review
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/create-v8-bess-electrical-topology-review.yml:1-57 · blob 777031f86da42aa2370d78bc27ec16bad253cec3 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: sub33kv_design · users: EPC_contractor, ICP_grid_engineer · canonical: production_core
name: Create V8 BESS Electrical Topology Review

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  create-v8-bess-electrical-topology-review:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GRIDBOT_PAT }}
          fetch-depth: 0

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Create V8 BESS electrical topology review app
        run: python scripts/create_v8_bess_electrical_topology_review.py

      - name: Run V8 BESS electrical topology review checks
        run: python scripts/test_create_v8_bess_electrical_topology_review.py

      - name: Commit and push V8 BESS electrical topology review app
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"

          git pull --rebase --autostash origin main

          git add \
            solar-bess-topology-v8/index.html \
            solar-bess-topology-v8/README.md \
            solar-bess-topology-v8/bess-electrical-topology-review/index.html \
            solar-bess-topology-v8/bess-electrical-topology-review/bess-electrical-topology-review.css \
            solar-bess-topology-v8/bess-electrical-topology-review/bess-electrical-topology-review.js \
            solar-bess-topology-v8/bess-electrical-topology-review/README.md \
            scripts/create_v8_bess_electrical_topology_review.py \
            scripts/test_create_v8_bess_electrical_topology_review.py \
            gridbot_reports/create_v8_bess_electrical_topology_review.md

          if git diff --cached --quiet; then
            echo "No V8 BESS electrical topology review changes to commit."
            exit 0
          fi

          git commit -m "Create V8 BESS electrical topology review app"
          git pull --rebase --autostash origin main
          git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main

GlobalGrid2050 Create V8 Battery Energy Storage System (BESS) Pcs Standalone Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/create-v8-bess-pcs-standalone.yml · lines 1–66 of 66 · Entry point

What it does
It runs battery storage (BESS) and solar. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage sub33kv_design (path word 'bess'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: battery storage (BESS), solar.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Create V8 Battery Energy Storage System (BESS) Pcs Standalone (`scripts/create_v8_bess_pcs_standalone.py`) and GlobalGrid2050 Test Create V8 Battery Energy Storage System (BESS) Pcs Standalone (`scripts/test_create_v8_bess_pcs_standalone.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Create V8 Battery Energy Storage System (BESS) Pcs Standalone (workflow run), GlobalGrid2050 Test Create V8 Battery Energy Storage System (BESS) Pcs Standalone (workflow run)
Used by
none found
Produces
none declared
Defines here
Create V8 BESS PCS Standalone
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/create-v8-bess-pcs-standalone.yml:1-66 · blob 8bec417274d798628250c412cc1d16d2f8a6a8a7 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: sub33kv_design · users: EPC_contractor, ICP_grid_engineer · canonical: production_core
name: Create V8 BESS PCS Standalone

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  create-v8-bess-pcs-standalone:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GRIDBOT_PAT }}
          fetch-depth: 0

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Create V8 BESS PCS standalone workspace
        run: python scripts/create_v8_bess_pcs_standalone.py

      - name: Run V8 BESS PCS standalone checks
        run: python scripts/test_create_v8_bess_pcs_standalone.py

      - name: Commit and push V8 BESS PCS standalone app
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"

          git pull --rebase --autostash origin main

          git add \
            solar-bess-topology-v8/index.html \
            solar-bess-topology-v8/README.md \
            solar-bess-topology-v8/bess-pcs-standalone/index.html \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5.css \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-config.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-helpers.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-state.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-substations.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-map.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-calculations.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-finance.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-ui-core.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-drawing.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-export.js \
            solar-bess-topology-v8/bess-pcs-standalone/gis-sld-v5-ui.js \
            scripts/create_v8_bess_pcs_standalone.py \
            scripts/test_create_v8_bess_pcs_standalone.py \
            gridbot_reports/create_v8_bess_pcs_standalone.md

          if git diff --cached --quiet; then
            echo "No V8 BESS PCS standalone changes to commit."
            exit 0
          fi

          git commit -m "Create V8 BESS PCS standalone app"
          git pull --rebase --autostash origin main
          git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main

GlobalGrid2050 Create UK Energy Tracking V4 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/create_uk_energy_tracking_v4.yml · lines 1–23 of 23 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Clone V3 Tracker to V4 (`scripts/clone_v3_tracker_to_v4.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Clone V3 Tracker to V4 (workflow run)
Used by
none found
Produces
none declared
Defines here
Create UK Energy Tracking V4
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/create_uk_energy_tracking_v4.yml:1-23 · blob f3eb99c26df66dac21cc81bb9ff8b91dd4f05ee1 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: Create UK Energy Tracking V4

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  create-v4:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Build V4 from V3 benchmark
        run: python scripts/clone_v3_tracker_to_v4.py

      - name: Commit V4 clone
        uses: stefanzweifel/git-auto-commit-action@v5
        with:
          commit_message: Clone UK energy tracker V3 to V4
          file_pattern: uk_energy_tracking_v4/** scripts/update_uk_energy_v4.py scripts/update_uk_price_v4.py scripts/update_oil_prices_v4.py scripts/update_uk_fuel_prices_v4.py gridbot_reports/clone_uk_energy_tracking_v3_to_v4.md

GlobalGrid2050 Datacentre News Workflow

A GitHub Actions workflow that builds and publishes the site. Runs on a schedule and by hand.

automationglobalgrid2050 / .github/workflows/datacentre-news.yml · lines 1–95 of 95 · Entry point

What it does
It builds and publishes the REPD register. Side effects: reads or writes files; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'datacentre'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: the REPD register.
Inputs & outputs
In: JSON file datacentre_news.json.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Named “Data-centre capex and politics news (three times a day, data branch)”; runs Datacentre Feed (`automation/news/datacentre_feed.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
Test Datacentre Feed (workflow run), Datacentre Feed (workflow run)
Used by
none found
Produces
none declared
Defines here
Data-centre capex and politics news (three times a day, data branch)
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/datacentre-news.yml:1-95 · blob b3e2a241941728fb3b7e4342aa586e6335ba54e9 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: ingest · effects: filesystem, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Data-centre capex and politics news (three times a day, data branch)
# Owner, 14 Nov 2026 00:56 UTC: "I want data centre CAPEX news and politics in the REPD pipeline. Simple."
# This is an owner-requested scheduled workflow (an exception to the 000_freeze manual-only rule, like the monthly
# REPD check). It reads a fixed list of public RSS/Atom feeds (automation/news/datacentre_feed.py, FEEDS), keeps
# headlines and links only, and publishes ONE file, datacentre_news.json, to the branch datacentre-news-data.
# It never pushes to main, never opens a PR, never deploys: the Pipeline News panel reads the file from
# raw.githubusercontent.com on that branch, so a daily refresh needs no Pages rebuild. A push made with
# GITHUB_TOKEN starts no other workflow. One feed failing is recorded in the file's "feeds" list and does not
# fail the job; the job fails only when every feed failed and there is no earlier file.
on:
  schedule:
    # Three slots, not one. The first single daily slot (05:23 UTC, 14 Nov 2026) had produced no run five hours later.
    # The cron line and the default branch were correct; scheduled runs in this repository arrive hours late and are
    # thinned (workflows set to run every hour or two start about once every six to nine hours; the daily 04:00
    # line count starts near 12:00). With one slot a late or dropped run costs a day; with three it costs hours.
    - cron: '23 5,11,17 * * *'
  workflow_dispatch:
permissions:
  contents: write
concurrency:
  group: datacentre-news
  cancel-in-progress: false
env:
  DATA_BRANCH: datacentre-news-data
jobs:
  refresh:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v4
        with:
          ref: main
          fetch-depth: 1
      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'
      - name: Tests (offline fixtures)
        run: |
          python -m pip install --quiet pytest
          python -m pytest -q -p no:cacheprovider automation/news/tests/test_datacentre_feed.py
      - name: Bring in the previous file from the data branch (keeps older items)
        run: |
          mkdir -p dist
          if git ls-remote --exit-code --heads origin "$DATA_BRANCH" >/dev/null; then
            git fetch --depth=1 origin "$DATA_BRANCH"
            git show FETCH_HEAD:dist/datacentre_news.json > dist/datacentre_news.json || rm -f dist/datacentre_news.json
          fi
      - name: Fetch feeds and build dist/datacentre_news.json
        run: python automation/news/datacentre_feed.py --out dist/datacentre_news.json
      - name: Summary
        if: always()
        run: |
          python - <<'EOF' >> "$GITHUB_STEP_SUMMARY"
          import json, pathlib
          p = pathlib.Path("dist/datacentre_news.json")
          if not p.exists():
              print("no output"); raise SystemExit
          d = json.loads(p.read_text())
          print(f"**{d['status']}**  {json.dumps(d['counts'])}\n")
          print("| feed | status | entries | kept | error |\n|---|---|---|---|---|")
          for f in d["feeds"]:
              print(f"| {f['url']} | {f['status']} | {f.get('entries','')} | {f.get('kept','')} | {f.get('error','')} |")
          print("\n| date | lanes | source | title |\n|---|---|---|---|")
          for i in d["items"][:15]:
              print(f"| {i['date']} | {'+'.join(i['lanes'])} | {i['source']} | {i['title']} |")
          EOF
      - name: Publish to the data branch
        run: |
          git config user.name 'github-actions[bot]'
          git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
          pub="$RUNNER_TEMP/pub"
          if git ls-remote --exit-code --heads origin "$DATA_BRANCH" >/dev/null; then
            git worktree add --detach "$pub" FETCH_HEAD
          else
            git worktree add --detach "$pub" HEAD
            git -C "$pub" checkout --orphan datacentre-news-tmp
            git -C "$pub" rm -rq --cached .
            find "$pub" -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} +
          fi
          mkdir -p "$pub/dist"
          cp dist/datacentre_news.json "$pub/dist/datacentre_news.json"
          printf '%s\n' "Published daily by .github/workflows/datacentre-news.yml on main. Headlines and links only." \
            "Read by the Pipeline News panel scripts/plugins/datacentre-news.js. Do not edit by hand." > "$pub/README.txt"
          git -C "$pub" add dist/datacentre_news.json README.txt
          if git -C "$pub" diff --cached --quiet; then
            echo "no change"; exit 0
          fi
          git -C "$pub" commit -q -m "data-centre news $(date -u +%Y-%m-%dT%H:%MZ)"
          git -C "$pub" push origin "HEAD:refs/heads/$DATA_BRANCH"
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: datacentre-news
          path: dist/datacentre_news.json
          retention-days: 14