mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-29 04:25:52 +01:00
ci(runner): validate provider and restart repairs
This commit is contained in:
1 parent
62b79deb20
commit
f4e99fe027
1 file changed
+23
-5
@@ -60,11 +60,18 @@ jobs:
|
||||
ACTOR_ID: ${{ github.actor_id }}
|
||||
TRIGGERING_ACTOR: ${{ github.triggering_actor }}
|
||||
ALLOWED_ACTOR_IDS: ${{ vars.RUNNER_E2E_ALLOWED_ACTOR_IDS }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
SELECT_ALL: ${{ inputs.all }}
|
||||
SELECT_ID: ${{ inputs.id }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
validation_ref="refs/heads/validation/runner-local-integrity-e2e"
|
||||
validation_ids="core-compatibility.runner-acpx-codex.local.message-marker,core-compatibility.runner-opencode.local.message-marker,local-session-integrity.runner-opencode.local.structured-question-restart-resume,local-session-integrity.runner-acpx-claude.local.structured-question-restart-resume,local-session-integrity.runner-acpx-codex.local.structured-question-restart-resume"
|
||||
if [ "$REF" != "refs/heads/$DEFAULT_BRANCH" ]; then
|
||||
echo "Paid runner E2E campaigns may run only from the default branch." >&2
|
||||
exit 1
|
||||
if [ "$REF" != "$validation_ref" ] || [ "$EVENT_NAME" != workflow_dispatch ] || [ "${SELECT_ALL:-false}" = true ] || [ "${SELECT_ID:-}" != "$validation_ids" ]; then
|
||||
echo "Non-default refs may run only the pinned scoped repair matrix from the validation branch." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if ! jq -e 'type == "array" and length > 0 and all(.[]; type == "number" and . > 0 and floor == .)' <<< "${ALLOWED_ACTOR_IDS:-}" >/dev/null; then
|
||||
echo "RUNNER_E2E_ALLOWED_ACTOR_IDS must be a non-empty JSON array of numeric GitHub user IDs." >&2
|
||||
@@ -287,7 +294,7 @@ jobs:
|
||||
test:
|
||||
name: ${{ matrix.executionId }}
|
||||
needs: [catalog, daytona_image]
|
||||
runs-on: ubuntu-latest-m
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: ${{ matrix.timeoutMinutes }}
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -306,9 +313,16 @@ jobs:
|
||||
ACTOR_ID: ${{ github.actor_id }}
|
||||
TRIGGERING_ACTOR: ${{ github.triggering_actor }}
|
||||
ALLOWED_ACTOR_IDS: ${{ vars.RUNNER_E2E_ALLOWED_ACTOR_IDS }}
|
||||
EXECUTION_ID: ${{ matrix.executionId }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test "$REF" = "refs/heads/$DEFAULT_BRANCH"
|
||||
if [ "$REF" != "refs/heads/$DEFAULT_BRANCH" ]; then
|
||||
test "$REF" = "refs/heads/validation/runner-local-integrity-e2e"
|
||||
case "$EXECUTION_ID" in
|
||||
core-compatibility.runner-acpx-codex.local.message-marker|core-compatibility.runner-opencode.local.message-marker|local-session-integrity.runner-opencode.local.structured-question-restart-resume|local-session-integrity.runner-acpx-claude.local.structured-question-restart-resume|local-session-integrity.runner-acpx-codex.local.structured-question-restart-resume) ;;
|
||||
*) echo "Execution is outside the pinned scoped repair matrix." >&2; exit 1 ;;
|
||||
esac
|
||||
fi
|
||||
jq -e 'type == "array" and length > 0 and all(.[]; type == "number" and . > 0 and floor == .)' <<< "${ALLOWED_ACTOR_IDS:-}" >/dev/null
|
||||
triggering_actor_id="$(gh api "users/$TRIGGERING_ACTOR" --jq .id)"
|
||||
jq -e --argjson candidate "$triggering_actor_id" 'index($candidate) != null' <<< "$ALLOWED_ACTOR_IDS" >/dev/null
|
||||
@@ -484,7 +498,11 @@ jobs:
|
||||
publish_history:
|
||||
name: Publish pruned immutable history and landing site
|
||||
needs: [catalog, report]
|
||||
if: always() && needs.catalog.result == 'success' && needs.report.outputs.history_source_ready == 'true'
|
||||
if: >-
|
||||
always() &&
|
||||
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) &&
|
||||
needs.catalog.result == 'success' &&
|
||||
needs.report.outputs.history_source_ready == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
concurrency:
|
||||
|
||||
Reference in new issue
Block a user