diff --git a/.github/schema/ip-ranges.schema.json b/.github/schema/ip-ranges.schema.json index 833fe55..6a54469 100644 --- a/.github/schema/ip-ranges.schema.json +++ b/.github/schema/ip-ranges.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/truefoundry/nat-ips/main/.github/schema/ip-ranges.schema.json", + "$id": "https://raw.githubusercontent.com/truefoundry/ip-ranges/main/.github/schema/ip-ranges.schema.json", "title": "TrueFoundry IP ranges", "description": "Outbound NAT addresses for one control plane. The directory (eu or us) is the control plane.", "type": "object", diff --git a/.github/scripts/build.py b/.github/scripts/build.py index 63bf2e3..8a3c685 100644 --- a/.github/scripts/build.py +++ b/.github/scripts/build.py @@ -19,7 +19,7 @@ ROOT = Path(__file__).resolve().parents[2] # .github/scripts/build.py -> repo root DIST_DIR = ROOT / "dist" PLANES = ("eu", "us") -REPO = "https://github.com/truefoundry/nat-ips" +REPO = "https://github.com/truefoundry/ip-ranges" def flat_ips(endpoints: list[dict]) -> list[str]: diff --git a/.github/scripts/release_notes.py b/.github/scripts/release_notes.py index e446d9f..008bca9 100644 --- a/.github/scripts/release_notes.py +++ b/.github/scripts/release_notes.py @@ -18,7 +18,8 @@ from datetime import datetime, timedelta, timezone from pathlib import Path -REPO = "https://github.com/truefoundry/nat-ips" +REPO = "https://github.com/truefoundry/ip-ranges" +PAGES = "https://truefoundry.github.io/ip-ranges" PLANES = ("eu", "us") ACTIVATION_DAYS = 15 @@ -164,7 +165,7 @@ def main() -> int: ) lines += [ "- Plain text, one CIDR per line: swap `.json` for `.txt`.", - f"- Always-latest: {REPO}/releases/latest/download/eu.json", + f"- Always-latest: {PAGES}/eu.json", "", ] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2705065..ea144ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,9 @@ on: permissions: contents: write + actions: write + pages: write + id-token: write concurrency: group: release @@ -118,3 +121,43 @@ jobs: --notes-file "${RUNNER_TEMP}/notes.md" \ --latest \ dist/* + + - name: Prepare the GitHub Pages site + if: ${{ !inputs.dry_run }} + run: | + mkdir -p site + cp dist/eu.json dist/us.json dist/eu.txt dist/us.txt site/ + cat > site/index.html << 'EOF' + + +
+ +