Skip to content

Commit

The mobile build workflow asks Expo's API without a token first and says what it answered, so a runner whose network Expo refuses (a bare 403, where a bad token gets 'The bearer token is invalid') fails with that, not 'GraphQL request failed'.

syntaqxcommitted Parentf1969f3Browse files
1 file+5−00/1 viewed
+5−0
6363 run: |
6464 # A token pasted with a newline breaks the request's header.
6565 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.
67+ code="$(curl -s -o /dev/null -w '%{http_code}' -X POST https://api.expo.dev/graphql \
68+ -H 'Content-Type: application/json' -d '{"query":"{ meUserActor { id } }"}')"
69+ 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
6671 npx --yes eas-cli@24.12.1 whoami
6772 npx --yes eas-cli@24.12.1 build --platform android --profile "$PROFILE" \
6873 --non-interactive --wait --json > build.json