mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-27 08:00:17 +00:00
fix(ci): address Copilot review — workflow_call, branch collision, merge failure [skip-regression-check]
1. Add workflow_call trigger to test.yml and e2e.yml so staging-ci can invoke them as reusable workflows. 2. Add github.run_id suffix to promotion branch name to prevent collision on workflow reruns. 3. Merge step now fails hard instead of swallowing errors. If merge fails, the step fails and the PR stays open. 4. update-tag intentionally advances regardless of gate outcome — this is by design so the next batch covers only new commits. Blocked batches stay as open PRs with review comments. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
831484abab
commit
402c71d642
@@ -1,5 +1,6 @@
|
||||
name: E2E Tests
|
||||
on:
|
||||
workflow_call:
|
||||
schedule:
|
||||
- cron: "0 6 * * 1" # Weekly Monday 6 AM UTC
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -146,7 +146,7 @@ jobs:
|
||||
if: steps.ahead-check.outputs.commits_ahead != '0'
|
||||
run: |
|
||||
SHORT_SHA=$(echo "${{ needs.check-changes.outputs.current_head }}" | cut -c1-8)
|
||||
BRANCH="staging-promote/${SHORT_SHA}"
|
||||
BRANCH="staging-promote/${SHORT_SHA}-${{ github.run_id }}"
|
||||
git checkout -b "$BRANCH"
|
||||
git push origin "$BRANCH"
|
||||
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
|
||||
@@ -392,6 +392,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Merge promotion PR
|
||||
id: merge
|
||||
if: steps.evaluate.outputs.passed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.token.outputs.token }}
|
||||
@@ -399,7 +400,8 @@ jobs:
|
||||
run: |
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
echo "Merging promotion PR #${PR_NUMBER}"
|
||||
gh pr merge "$PR_NUMBER" --merge --delete-branch || echo "::warning::Auto-merge failed for PR #${PR_NUMBER}"
|
||||
gh pr merge "$PR_NUMBER" --merge --delete-branch
|
||||
echo "merged=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
# ── Update tested tag (always, so next batch covers only new commits) ──
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
name: Run Tests
|
||||
on:
|
||||
workflow_call:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
|
||||
Reference in New Issue
Block a user