| name | push-and-deploy |
| description | Monitor GitHub Actions CI after a git push and deploy odin-scout to acc-onb via the odin CLI. Use proactively after any git push to the odin-scout-ent repository. Offers to poll CI status and trigger deployment when checks pass. |
Push and Deploy
After every git push on odin-scout-ent, offer to monitor CI and deploy.
Trigger
Activate this skill whenever:
- You run
git push for the user
- The user mentions pushing code, deploying, or asks to "push and deploy"
- The user asks to deploy after CI passes
Workflow
Step 1: Ensure Branch PR Exists
After a push completes, verify whether the current branch already has an open PR.
Use:
if [ -d ".cursor/skills/push-and-deploy" ] && [ -f "scripts/push-poll-deploy.sh" ]; then
REPO_ROOT="$PWD"
elif [ -d "odin-scout-ent/.cursor/skills/push-and-deploy" ] && [ -f "odin-scout-ent/scripts/push-poll-deploy.sh" ]; then
REPO_ROOT="$PWD/odin-scout-ent"
else
echo "Could not locate odin-scout-ent from current directory."
exit 1
fi
cd "$REPO_ROOT"
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
gh pr list --head "$CURRENT_BRANCH" --state open --json number,url --limit 1
- If an open PR exists, continue to Step 2.
- If no open PR exists, ask the user:
No open PR found for branch {branch}. Want me to create one now?
- Do not create a PR unless the user explicitly confirms.
- If the user declines, continue to Step 2 (deploy flow can still proceed).
- If the user confirms, create the PR and then continue to Step 2.
Create the PR with:
if [ -d ".cursor/skills/push-and-deploy" ] && [ -f "scripts/push-poll-deploy.sh" ]; then
REPO_ROOT="$PWD"
elif [ -d "odin-scout-ent/.cursor/skills/push-and-deploy" ] && [ -f "odin-scout-ent/scripts/push-poll-deploy.sh" ]; then
REPO_ROOT="$PWD/odin-scout-ent"
else
echo "Could not locate odin-scout-ent from current directory."
exit 1
fi
cd "$REPO_ROOT"
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
BASE_BRANCH="$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')"
gh pr create --base "$BASE_BRANCH" --head "$CURRENT_BRANCH" --fill
After creation, report the PR URL to the user.
Step 2: Run the Deploy Script
Execute the deploy script from a terminal:
if [ -d ".cursor/skills/push-and-deploy" ] && [ -f "scripts/push-poll-deploy.sh" ]; then
REPO_ROOT="$PWD"
elif [ -d "odin-scout-ent/.cursor/skills/push-and-deploy" ] && [ -f "odin-scout-ent/scripts/push-poll-deploy.sh" ]; then
REPO_ROOT="$PWD/odin-scout-ent"
else
echo "Could not locate odin-scout-ent from current directory."
exit 1
fi
cd "$REPO_ROOT"
./scripts/push-poll-deploy.sh --skip-push
Use --skip-push because the push already happened.
The script will:
- Extract the version from
.odin/odin-scout/application-spec.yaml
- Poll
gh run list every 30s until CI completes (up to 15 min)
- On success: deploy via
odin operate component with auto-confirmation
- On failure: print the error and abort
Run this as a backgrounded command (block_until_ms: 0) and monitor the terminal output.
Step 3: Report Results
If CI passes and deploy succeeds:
CI passed and odin-scout v{version} has been deployed to acc-onb.
If CI fails:
CI failed. [link to failed run]. Deployment aborted.
If deploy fails:
CI passed but deployment failed: [error details].
Script Options
| Flag | Purpose |
|---|
--skip-push | Don't push again (already pushed) |
--skip-poll | Skip CI polling, deploy immediately |
--env ENV | Override deploy environment (default: acc-onb) |
--version VER | Override artifact version |
--oam-host HOST | Override OAM gRPC host |
--dry-run | Print deploy command without executing |
Manual Invocation
If the user wants to run the full flow (push + poll + deploy) in one shot:
if [ -d ".cursor/skills/push-and-deploy" ] && [ -f "scripts/push-poll-deploy.sh" ]; then
REPO_ROOT="$PWD"
elif [ -d "odin-scout-ent/.cursor/skills/push-and-deploy" ] && [ -f "odin-scout-ent/scripts/push-poll-deploy.sh" ]; then
REPO_ROOT="$PWD/odin-scout-ent"
else
echo "Could not locate odin-scout-ent from current directory."
exit 1
fi
cd "$REPO_ROOT"
./scripts/push-poll-deploy.sh
Notes
- The
odin CLI and gh CLI must both be in PATH
- The deploy auto-confirms the "No changes" prompt via
echo y |
- Default deploy target is
acc-onb with OAM host oam-ent-acc-onb.dss-platform.private
- Version is read from
.odin/odin-scout/application-spec.yaml