From 4b3172859d47fef250049fbc0aadf12211be8722 Mon Sep 17 00:00:00 2001 From: Stuart Rowlands Date: Sun, 18 Oct 2026 15:53:00 +1000 Subject: [PATCH 1/4] README: v7 (CLI 7.0.0), quant/ layout, explicit uuids, upgrade notes --- README.md | 64 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 3e7d168..fdf7de3 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Deploy to QuantCDN Action -This GitHub Action deploys your static site and/or functions to QuantCDN using the Quant CLI v6. +This GitHub Action deploys your static site and/or functions to QuantCDN using the Quant CLI v7. ## Usage ### Deploy Assets ```yaml -- uses: quantcdn/action-deploy@v6 +- uses: quantcdn/action-deploy@v7 with: customer: your-customer-id project: your-project-name @@ -16,12 +16,12 @@ This GitHub Action deploys your static site and/or functions to QuantCDN using t ### Deploy Functions ```yaml -- uses: quantcdn/action-deploy@v6 +- uses: quantcdn/action-deploy@v7 with: customer: your-customer-id project: your-project-name token: ${{ secrets.QUANT_TOKEN }} - functions: './functions.json' + functions: quant/edge-functions.json ``` ## Inputs @@ -68,7 +68,7 @@ jobs: npm run build - name: Deploy to QuantCDN - uses: quantcdn/action-deploy@v6 + uses: quantcdn/action-deploy@v7 with: customer: your-customer-id project: your-project-name @@ -78,30 +78,37 @@ jobs: ### Functions Deployment -Create a functions configuration file (e.g., `functions.json`): +Declare your functions in `quant/edge-functions.json`. Every entry needs a +`uuid`: it is the function's identity, so keep it in the repository and never +change it. Create entries with `quant functions-add`, which writes a new UUID: + +```sh +npx @quantcdn/quant-cli@7 functions-add quant/edge-functions.json quant/edge-functions/api.js --description "API" --id my-api +``` + ```json [ { "type": "auth", - "path": "./functions/auth.js", + "path": "quant/edge-functions/auth.js", "description": "Authentication function", + "id": "gate", "uuid": "11111111-1111-4111-a111-111111111111" }, - { - "type": "filter", - "path": "./functions/filter.js", - "description": "Filter function", - "uuid": "22222222-2222-4222-a222-222222222222" - }, { "type": "function", - "path": "./functions/function.js", + "path": "quant/edge-functions/api.js", "description": "Edge function", + "id": "my-api", "uuid": "33333333-3333-4333-a333-333333333333" } ] ``` +`type` is `function`, `edge`, `auth` or `filter`; `id` is optional (a lowercase +slug that rules use as `function_ref`). The whole manifest is checked before the +first upload, and a manifest entry without a `uuid` fails the step. + Then deploy using: ```yaml name: Deploy Functions to QuantCDN @@ -116,12 +123,12 @@ jobs: - uses: actions/checkout@v6 - name: Deploy Functions - uses: quantcdn/action-deploy@v6 + uses: quantcdn/action-deploy@v7 with: customer: your-customer-id project: your-project-name token: ${{ secrets.QUANT_TOKEN }} - functions: './functions.json' + functions: quant/edge-functions.json ``` ### Combined Deployment @@ -144,28 +151,28 @@ jobs: npm run build - name: Deploy to QuantCDN - uses: quantcdn/action-deploy@v6 + uses: quantcdn/action-deploy@v7 with: customer: your-customer-id project: your-project-name token: ${{ secrets.QUANT_TOKEN }} dir: build - functions: './functions.json' + functions: quant/edge-functions.json ``` ## Notes -- This action uses Quant CLI v6 +- This action uses Quant CLI v7 (`quantcdn/cli:7.0.0`, pinned by digest) - For search functionality, please use the dedicated search action - Make sure your `QUANT_TOKEN` is stored securely in your repository secrets ## Edge rules -Provide `rules: edge-rules.json`, `functions: edge-functions.json`, +Provide `rules: quant/edge-rules.json`, `functions: quant/edge-functions.json`, `api-token: ${{ secrets.QUANT_API_TOKEN }}` and `api-base-url: ${{ vars.QUANT_BASE_URL }}` alongside the normal deployment inputs. The Quant portal injects the project-scoped API secret and the environment-specific -portal `/api/v2` URL when a static or Studio template includes `edge-rules.json`. +portal `/api/v2` URL when a static or Studio template includes `quant/edge-rules.json`. Uploads continue to use the separate `token` input. Never substitute the content write token for `api-token`. @@ -192,3 +199,18 @@ idempotent, so the rules step converges and unchanged assets are skipped. ## License MIT License + +## Upgrading from v6 to v7 + +v7 runs Quant CLI 7.0.0. The only breaking change is for edge functions: + +- Every entry in the `functions` manifest needs an explicit `uuid`. v6 derived + one from `id` when it was missing. v7 fails the "Deploy Functions" step (or the + rules dry run, when `rules` is set) before anything is uploaded, and names each + entry. To keep a function v6 deployed by `id`, copy its UUID from the dashboard + (Compute > Edge Functions) into the entry, or see the Quant CLI README for a + command that prints the UUID v6 derived. +- The manifest is checked against the full schema (lowercase `type`, non-blank + `description`, unique `uuid` and `id`). + +`@v6` is not changed and keeps CLI 6.3.0. From 731f3bec9f5e760a637084e0c09be0e08e38b971 Mon Sep 17 00:00:00 2001 From: Stuart Rowlands Date: Sun, 18 Oct 2026 18:10:09 +1000 Subject: [PATCH 2/4] v7: run Quant CLI 7.0.0 (explicit edge function uuids) Pins all four docker:// steps to quantcdn/cli:7.0.0 by digest (sha256:e9562fac5914c7a8cef3fc4f3ad88004fd125500d8643577dd81cd20e7ee2e33, linux/amd64 and linux/arm64). Breaking for edge functions only: every functions-manifest entry needs a uuid. A manifest without one fails at "Deploy Functions", or at the rules dry run when rules is set, before anything is uploaded. v6 is not changed. --- README.md | 2 +- action.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fdf7de3..2597b4a 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ jobs: ## Notes -- This action uses Quant CLI v7 (`quantcdn/cli:7.0.0`, pinned by digest) +- This action uses Quant CLI v7 (`quantcdn/cli:7.0.0@sha256:e9562fac…`, pinned by digest) - For search functionality, please use the dedicated search action - Make sure your `QUANT_TOKEN` is stored securely in your repository secrets diff --git a/action.yml b/action.yml index 7ca67bc..578f84c 100644 --- a/action.yml +++ b/action.yml @@ -80,7 +80,7 @@ runs: - name: Validate Rules Access if: inputs.rules != '' - uses: "docker://quantcdn/cli:6.3.0@sha256:cc5025e8749068b3a445331430d461be9467ce0f811838fdba9710dd388d4054" + uses: "docker://quantcdn/cli:7.0.0@sha256:e9562fac5914c7a8cef3fc4f3ad88004fd125500d8643577dd81cd20e7ee2e33" env: QUANT_API_TOKEN: ${{ inputs.api-token }} QUANT_BASE_URL: ${{ inputs.api-base-url }} @@ -96,7 +96,7 @@ runs: - name: Deploy Functions if: inputs.functions != '' - uses: "docker://quantcdn/cli:6.3.0@sha256:cc5025e8749068b3a445331430d461be9467ce0f811838fdba9710dd388d4054" + uses: "docker://quantcdn/cli:7.0.0@sha256:e9562fac5914c7a8cef3fc4f3ad88004fd125500d8643577dd81cd20e7ee2e33" env: CUSTOMER: ${{ inputs.customer }} TOKEN: ${{ inputs.token }} @@ -113,7 +113,7 @@ runs: - name: Deploy Assets if: inputs.dir != '' - uses: "docker://quantcdn/cli:6.3.0@sha256:cc5025e8749068b3a445331430d461be9467ce0f811838fdba9710dd388d4054" + uses: "docker://quantcdn/cli:7.0.0@sha256:e9562fac5914c7a8cef3fc4f3ad88004fd125500d8643577dd81cd20e7ee2e33" with: args: > deploy @@ -132,7 +132,7 @@ runs: - name: Deploy Rules if: inputs.rules != '' - uses: "docker://quantcdn/cli:6.3.0@sha256:cc5025e8749068b3a445331430d461be9467ce0f811838fdba9710dd388d4054" + uses: "docker://quantcdn/cli:7.0.0@sha256:e9562fac5914c7a8cef3fc4f3ad88004fd125500d8643577dd81cd20e7ee2e33" env: QUANT_API_TOKEN: ${{ inputs.api-token }} QUANT_BASE_URL: ${{ inputs.api-base-url }} From f9e2c9885f0871ae28c556d5d20bacbc5ba22252 Mon Sep 17 00:00:00 2001 From: Stuart Rowlands Date: Sun, 18 Oct 2026 18:12:46 +1000 Subject: [PATCH 3/4] CI: a functions manifest without a uuid fails before upload --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e4e5b2..7b31479 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -135,6 +135,34 @@ jobs: dir: build functions: "./functions/config.json" + # CLI 7: a manifest entry without a uuid is refused before anything is uploaded. + test-functions-require-uuid: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + + - name: Prepare a manifest without a uuid + run: | + mkdir -p quant/edge-functions + echo 'return new Response("x");' > quant/edge-functions/api.js + echo '[{"type":"function","path":"quant/edge-functions/api.js","description":"No uuid"}]' > quant/edge-functions.json + + - name: Deploy must fail before upload + id: deploy + continue-on-error: true + uses: ./ + with: + customer: quant + project: github-actions + token: ${{ secrets.QUANT_TOKEN }} + functions: quant/edge-functions.json + + - name: The deploy step failed + if: steps.deploy.outcome != 'failure' + run: | + echo "::error::a manifest entry without a uuid was accepted" + exit 1 + test-rules-guard: runs-on: ubuntu-latest steps: From 9c6e57e71607b9cd39761862e4967f8b802984fa Mon Sep 17 00:00:00 2001 From: QuantCode Agent Date: Sun, 18 Oct 2026 09:35:43 +0000 Subject: [PATCH 4/4] docs: fix README repo links to quantcdn/deploy-action --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2597b4a..a9c84f0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This GitHub Action deploys your static site and/or functions to QuantCDN using t ### Deploy Assets ```yaml -- uses: quantcdn/action-deploy@v7 +- uses: quantcdn/deploy-action@v7 with: customer: your-customer-id project: your-project-name @@ -16,7 +16,7 @@ This GitHub Action deploys your static site and/or functions to QuantCDN using t ### Deploy Functions ```yaml -- uses: quantcdn/action-deploy@v7 +- uses: quantcdn/deploy-action@v7 with: customer: your-customer-id project: your-project-name @@ -68,7 +68,7 @@ jobs: npm run build - name: Deploy to QuantCDN - uses: quantcdn/action-deploy@v7 + uses: quantcdn/deploy-action@v7 with: customer: your-customer-id project: your-project-name @@ -123,7 +123,7 @@ jobs: - uses: actions/checkout@v6 - name: Deploy Functions - uses: quantcdn/action-deploy@v7 + uses: quantcdn/deploy-action@v7 with: customer: your-customer-id project: your-project-name @@ -151,7 +151,7 @@ jobs: npm run build - name: Deploy to QuantCDN - uses: quantcdn/action-deploy@v7 + uses: quantcdn/deploy-action@v7 with: customer: your-customer-id project: your-project-name