This action runs a Pagespeed report on a Shopify store and sends the report to a Google Cloud Function.
- Implement logic to preview other branches (temp theme)
store: The Shopify store domain, e.g.acme-de.myshopify.com. A bare shop handle such asacme-deis accepted too and gets.myshopify.comappended; a full URL is stripped down to the host. Use themyshopify.comdomain, not a custom domain — the Admin API only answers on the former. (required)access_token: The Shopify Admin API access token, needs read access to products and collections. Optional: if it is empty,0orunknown, the product and collection tests are skipped and only the home page is measured. (optional)project: The JIRA project key, used as theprojectdimension in reporting. (required)commit_hash: The git commit hash. (required)branch: The git branch. (required)runs: How many times to repeat each PageSpeed test, 1 to 5. (optional, default 3)
The action authenticates through Workload Identity Federation. There is no service
account key any more — the sa_key input was removed. GitHub's OIDC token is exchanged for
a short-lived identity token inside the action.
Two consequences for the calling workflow:
- The job must grant
id-token: write. A composite action cannot grant this to itself. Only use it inschedule,pushorworkflow_dispatchworkflows, never inpull_request. - The calling repository must be on the WIF allowlist of
td-pagespeed-metrics. The OIDC token identifies the repository that calls the action, not this repository. To add a shop, ask the data team (see DATASUP-334).
Measurements go to
https://europe-west3-td-pagespeed-metrics.cloudfunctions.net/td-gcf-pagespeed-metrics-collector
and land in td-pagespeed-metrics.pagespeed_raw.pagespeed_data.
- Configure the local env file (copy the
.disttemplate in this repo) - Run PageSpeed Google Cloud Ingestor locally
npx functions-framework --target=ingestPageSpeed --port=8080 - Run
./run.sh
Note: the env template still carries the removed INPUT_SA_KEY variable. Local runs now
need ID_TOKEN instead — either a token obtained with
gcloud auth print-identity-token, or any value when pointing CLOUD_FUNCTION_URL at a
local functions-framework instance that does not verify it.
See dev/example_github_workflow.yml.