Skip to content

Commit

The mobile workflows need Expo's hosts allowed: a cloud job's sandbox reaches only the build hosts and the project's lists, and refused api.expo.dev with a bare 403. mobile-build.yml names the three workflow-only domains to add in the project's Guardrails (api.expo.dev, expo.dev, storage.googleapis.com, limited to mobile-build.yml and mobile-release.yml), and its probe's error says to add them.

syntaqxcommitted Parent6f433f8Browse files
1 file+10−30/1 viewed
+10−3
1212 # the app's code from `npx expo start` on your computer.
1313 #
1414 # Needs the repository secret EXPO_TOKEN (an Expo access token with access
15−# to @flagon-io/g1t).
15+# to @flagon-io/g1t), and Expo's hosts allowed for these workflows alone in
16+# the project's Settings, Guardrails, Workflow-only domains:
17+#
18+# api.expo.dev | mobile-build.yml, mobile-release.yml
19+# expo.dev | mobile-build.yml, mobile-release.yml
20+# storage.googleapis.com | mobile-build.yml, mobile-release.yml
21+#
22+# (the API, its artifacts, and where EAS uploads the project's archive).
1623 name: Mobile build
1724
1825 on:
6370 run: |
6471 # A token pasted with a newline breaks the request's header.
6572 export EXPO_TOKEN="$(printf %s "$EXPO_TOKEN" | tr -d '[:space:]')"
66− # Without a token Expo answers 200; a bare 403 is its edge refusing this network.
73+ # Without a token Expo answers 200; a bare 403 is the sandbox's egress refusing it.
6774 code="$(curl -s -o /dev/null -w '%{http_code}' -X POST https://api.expo.dev/graphql \
6875 -H 'Content-Type: application/json' -d '{"query":"{ meUserActor { id } }"}')"
6976 echo "api.expo.dev answers this runner with $code"
70− if [ "$code" = 403 ]; then echo "::error::Expo refuses requests from this runner's network"; exit 1; fi
77+ if [ "$code" = 403 ]; then echo "::error::api.expo.dev is not allowed: add the workflow-only domains above in the project's Guardrails"; exit 1; fi
7178 npx --yes eas-cli@24.12.1 whoami
7279 npx --yes eas-cli@24.12.1 build --platform android --profile "$PROFILE" \
7380 --non-interactive --wait --json > build.json