Skip to content

Commit 88ba670

Browse files
authored
Session work\n\nAuto-commit at session end to preserve work in progress.\n\nSession-ID: 5744c168-6eb5-4fd8-9362-bbb6455f058f\nSession-Timestamp: 2026-01-31T02:33:41.451Z\nBranch: 74-fix/please-add-the-thin-ci-caller-workflow-u\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> (#75)
1 parent 9d14d05 commit 88ba670

3 files changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Sync Constellos Review Workflow
2+
description: Fetches the latest constellos-review.yml template and updates the local copy if outdated
3+
4+
inputs:
5+
workflow_path:
6+
description: Path to the local workflow file to sync
7+
required: false
8+
default: .github/workflows/constellos-review.yml
9+
template_url:
10+
description: URL to fetch the latest template from
11+
required: false
12+
default: https://raw.githubusercontent.com/constellos/github-agents/main/.github/templates/constellos-review.yml
13+
14+
runs:
15+
using: composite
16+
steps:
17+
- name: Sync workflow file
18+
shell: bash
19+
env:
20+
WORKFLOW_PATH: ${{ inputs.workflow_path }}
21+
TEMPLATE_URL: ${{ inputs.template_url }}
22+
run: |
23+
echo "::group::Sync constellos-review.yml"
24+
25+
# Fetch latest template
26+
LATEST=$(curl -fsSL "$TEMPLATE_URL" 2>&1) || {
27+
echo "::warning::Failed to fetch latest template from $TEMPLATE_URL"
28+
echo "::endgroup::"
29+
exit 0
30+
}
31+
32+
# Compare with local copy
33+
if [ -f "$WORKFLOW_PATH" ]; then
34+
LOCAL=$(cat "$WORKFLOW_PATH")
35+
if [ "$LATEST" = "$LOCAL" ]; then
36+
echo "Workflow is up to date."
37+
echo "::endgroup::"
38+
exit 0
39+
fi
40+
fi
41+
42+
echo "Workflow is outdated — updating."
43+
mkdir -p "$(dirname "$WORKFLOW_PATH")"
44+
echo "$LATEST" > "$WORKFLOW_PATH"
45+
46+
# Configure git and push
47+
git config user.name "github-actions[bot]"
48+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
49+
git add "$WORKFLOW_PATH"
50+
git commit -m "chore: sync constellos-review.yml from template" || {
51+
echo "::warning::Nothing to commit (file unchanged after write)."
52+
echo "::endgroup::"
53+
exit 0
54+
}
55+
git push || {
56+
echo "::warning::Failed to push workflow sync commit. The PR branch may be from a fork."
57+
echo "::endgroup::"
58+
exit 0
59+
}
60+
61+
echo "Workflow synced successfully."
62+
echo "::endgroup::"

.github/templates/constellos-review.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ permissions:
1515
pull-requests: read # REQUIRED: agents need this to fetch changed files via gh pr view
1616

1717
jobs:
18+
# Auto-sync this workflow from the latest template
19+
sync-workflow:
20+
if: github.event.pull_request.head.repo.full_name == github.repository
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
ref: ${{ github.head_ref }}
28+
- uses: constellos/github-agents/.github/actions/sync-workflow@main
29+
1830
# Read config and determine which agents to run
1931
config:
2032
runs-on: ubuntu-latest

.github/workflows/ci-pipeline.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: ['**']
6+
7+
jobs:
8+
CI:
9+
uses: constellos/.github/.github/workflows/ci-pipeline-reusable.yml@main
10+
secrets: inherit

0 commit comments

Comments
 (0)