Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-failure-analyst.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions .github/workflows/deploy-pr-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy pr-review.yml
Comment thread
don-petry marked this conversation as resolved.

on:
workflow_dispatch:
inputs:
repos:
description: 'Repos to deploy to (comma-separated)'
required: true
default: 'bmad-bgreat-suite,google-app-scripts,markets,ContentTwin'

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
Comment on lines +15 to +16
strategy:
fail-fast: false
matrix:
repo: [bmad-bgreat-suite, google-app-scripts, markets, ContentTwin]
Comment thread
don-petry marked this conversation as resolved.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Comment thread
don-petry marked this conversation as resolved.

steps:
- uses: actions/checkout@v4

- name: Deploy pr-review.yml to ${{ matrix.repo }}
env:
GH_TOKEN: ${{ secrets.GH_PAT_WORKFLOWS }}
run: |
# Read the file
CONTENT=$(cat .github/workflows/pr-review.yml)

# Create base64 encoded content
CONTENT_B64=$(echo "$CONTENT" | base64 -w0)

# Try to deploy via API
gh api repos/petry-projects/${{ matrix.repo }}/contents/.github/workflows/pr-review.yml \
-X PUT \
-f message="deploy: add pr-review.yml workflow" \
-f content="$CONTENT_B64" 2>&1 | tee deploy.log

Check failure on line 40 in .github/workflows/deploy-pr-review.yml

View workflow job for this annotation

GitHub Actions / Lint

40:1 [trailing-spaces] trailing spaces
# Check if successful
if grep -q '"commit"' deploy.log; then
echo "✅ Deployed to ${{ matrix.repo }}"
else
echo "⚠️ Deployment to ${{ matrix.repo }} may have failed"
cat deploy.log
fi
33 changes: 17 additions & 16 deletions .github/workflows/force-deploy-pr-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,28 @@
matrix:
repo: [bmad-bgreat-suite, google-app-scripts]
max-parallel: 1

Check failure on line 16 in .github/workflows/force-deploy-pr-review.yml

View workflow job for this annotation

GitHub Actions / Lint

16:1 [trailing-spaces] trailing spaces
steps:
- uses: actions/checkout@v6

- name: Deploy to ${{ matrix.repo }}
- uses: actions/checkout@v4

Check failure on line 19 in .github/workflows/force-deploy-pr-review.yml

View workflow job for this annotation

GitHub Actions / Lint

19:1 [trailing-spaces] trailing spaces
- name: Deploy pr-review.yml to ${{ matrix.repo }} via Actions
run: |
mkdir -p temp_repo
cd temp_repo

git clone https://${{ secrets.GITHUB_TOKEN }}@github.com/petry-projects/${{ matrix.repo }}.git
cd ${{ matrix.repo }}

# Clone target repo
git clone https://${{ secrets.GITHUB_TOKEN }}@github.com/petry-projects/${{ matrix.repo }}.git target_repo
cd target_repo

Check failure on line 25 in .github/workflows/force-deploy-pr-review.yml

View workflow job for this annotation

GitHub Actions / Lint

25:1 [trailing-spaces] trailing spaces
# Configure git
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git config user.email "github-actions[bot]@users.noreply.github.com"

Check failure on line 29 in .github/workflows/force-deploy-pr-review.yml

View workflow job for this annotation

GitHub Actions / Lint

29:1 [trailing-spaces] trailing spaces
# Copy pr-review.yml
mkdir -p .github/workflows
cp ../../.github/workflows/pr-review.yml .github/workflows/

cp ../.github/workflows/pr-review.yml .github/workflows/

Check failure on line 33 in .github/workflows/force-deploy-pr-review.yml

View workflow job for this annotation

GitHub Actions / Lint

33:1 [trailing-spaces] trailing spaces
# Commit and push
git add .github/workflows/pr-review.yml
if git commit -m "deploy: add pr-review.yml workflow"; then
git push origin main && echo "✅ Deployed" || echo "⚠️ Push failed"
if git commit -m "deploy: add pr-review.yml workflow [skip ci]"; then
git push origin HEAD:main && echo "✅ Pushed to main" || echo "⚠️ Push failed"
else
echo "ℹ️ Nothing to commit"
fi
2 changes: 1 addition & 1 deletion docs/aw/ci-failure-analyst.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The workflow uses the **reusable workflow** (`workflow_call`) pattern — the sa
```
repo-x (check_run: failure)
└─ .github/workflows/ci-failure-analyst.yml ← ~20-line stub (no logic)
└─ uses: petry-projects/.github-private/.github/workflows/ci-failure-analyst-reusable.yml@121bee881bd13715706d30230b2d5a8d2d78b0b1 # main
└─ uses: petry-projects/.github-private/.github/workflows/ci-failure-analyst-reusable.yml@db60a41eb00b127f201c7294c529c7c599324e4e # main
├─ resolves PR (non-fork only)
├─ idempotency check (<!-- ci-analyst sha=... -->)
├─ installs Claude Code
Expand Down
2 changes: 1 addition & 1 deletion templates/ci-failure-analyst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
if: >-
github.event.check_run.conclusion == 'failure' &&
!startsWith(github.event.check_run.name, 'CI Failure Analyst')
uses: petry-projects/.github-private/.github/workflows/ci-failure-analyst-reusable.yml@121bee881bd13715706d30230b2d5a8d2d78b0b1 # main
uses: petry-projects/.github-private/.github/workflows/ci-failure-analyst-reusable.yml@db60a41eb00b127f201c7294c529c7c599324e4e # main
Comment thread
don-petry marked this conversation as resolved.
secrets:
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
Loading