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' + + + + + TrueFoundry IP ranges + + +

TrueFoundry IP ranges

+ + + + EOF + + - name: Upload the GitHub Pages artifact + if: ${{ !inputs.dry_run }} + uses: actions/upload-pages-artifact@v3 + with: + path: site + + pages: + needs: release + if: ${{ !inputs.dry_run && needs.release.result == 'success' }} + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index 3986fea..8a1b998 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,14 @@ The directory is the control plane: | EU | [`eu/ip-ranges.json`](eu/ip-ranges.json) | | US | [`us/ip-ranges.json`](us/ip-ranges.json) | -Each [GitHub Release](https://github.com/truefoundry/nat-ips/releases) attaches the same lists: +Always-latest URLs are on GitHub Pages: -- https://github.com/truefoundry/nat-ips/releases/latest/download/eu.json -- https://github.com/truefoundry/nat-ips/releases/latest/download/us.json +- https://truefoundry.github.io/ip-ranges/eu.json +- https://truefoundry.github.io/ip-ranges/us.json -Replace `.json` with `.txt` for one CIDR per line. Pin a release by replacing `latest/download` with `download/v2026.10.12`. +Replace `.json` with `.txt` for one CIDR per line. + +Each [GitHub Release](https://github.com/truefoundry/ip-ranges/releases) attaches the same lists, so a version can be pinned: `https://github.com/truefoundry/ip-ranges/releases/download/v2026.10.12/eu.json`. ## What to allowlist @@ -67,9 +69,9 @@ When an address is removed, a new release is published. Drop it from your allowl To be notified, choose **Watch → Custom → Releases** on this repository, or subscribe to: ``` -https://github.com/truefoundry/nat-ips/releases.atom +https://github.com/truefoundry/ip-ranges/releases.atom ``` ## Reporting a problem -Something wrong or missing? [Open an issue](https://github.com/truefoundry/nat-ips/issues) or contact TrueFoundry support. For anything security-sensitive, email security@truefoundry.com. +Something wrong or missing? [Open an issue](https://github.com/truefoundry/ip-ranges/issues) or contact TrueFoundry support. For anything security-sensitive, email security@truefoundry.com.