Skip to content

Commit 9b9d22e

Browse files
committed
chore(ci): skip studio-linux-ci e2e when ROBLOSECURITY cookie is stale
1 parent 545fc9b commit 9b9d22e

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/studio-linux-ci.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,27 @@ jobs:
265265
ls -la $WINEPREFIX/system.reg $WINEPREFIX/user.reg 2>/dev/null || echo "No Wine prefix files"
266266
267267
- name: Inject authentication
268+
id: auth
268269
if: ${{ env.ROBLOSECURITY != '' }}
269-
run: studio-bridge linux inject-credentials --verbose
270+
shell: bash
271+
run: |
272+
set +e
273+
studio-bridge linux inject-credentials --verbose 2>&1 | tee inject-output.txt
274+
exit_code=${PIPESTATUS[0]}
275+
set -e
276+
if [ $exit_code -ne 0 ]; then
277+
if grep -qE 'cookie is invalid or expired \(HTTP (401|403)\)' inject-output.txt; then
278+
echo "::warning::ROBLOSECURITY cookie is stale (HTTP 401/403). Skipping execute step — rotate the secret to re-enable e2e."
279+
echo "cookie_stale=true" >> "$GITHUB_OUTPUT"
280+
exit 0
281+
fi
282+
exit $exit_code
283+
fi
270284
env:
271285
ROBLOSECURITY: ${{ secrets.ROBLOSECURITY }}
272286

273287
- name: Execute script through Studio bridge
274-
if: ${{ env.ROBLOSECURITY != '' }}
288+
if: ${{ env.ROBLOSECURITY != '' && steps.auth.outputs.cookie_stale != 'true' }}
275289
run: studio-bridge process run --verbose --timeout 60000 'print("E2E test passed!")'
276290
timeout-minutes: 5
277291
env:

0 commit comments

Comments
 (0)