e071084ebe
govulncheck / govulncheck (push) Has been cancelled
Lint / golangci-lint (push) Has been cancelled
Run Tests / Unit Tests (push) Has been cancelled
Run Tests / Etcd Integration Tests (push) Has been cancelled
Harness (E2E) / Harnesses (mock LLM) (push) Has been cancelled
Harness (E2E) / Provider harnesses (live LLM conformance) (push) Has been cancelled
61 lines
2.4 KiB
Cheetah
61 lines
2.4 KiB
Cheetah
name: "<< .WorkflowName >>"
|
|
|
|
# Generated by `micro loop init`. A dispatch role of the autonomous loop: on a
|
|
# cadence it opens a fresh tracking issue and posts the instruction in
|
|
# .github/loop/prompts/<< .Role >>.md to the agent (<< .AgentMention >>).
|
|
#
|
|
# The workflow is the MECHANISM; that prompt file is the editable POLICY —
|
|
# change what this role does by editing the prompt, not this YAML. A FRESH
|
|
# issue per run is deliberate: agents derive the PR branch name from the
|
|
# triggering issue, so reusing one tracker collapses every run onto one branch.
|
|
#
|
|
# Gated on << .TokenSecret >>: the agent ignores @mentions from the
|
|
# github-actions bot, so dispatch posts as a real user (a PAT). No token → no-op.
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
schedule:
|
|
- cron: "<< .Cron >>"
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
concurrency:
|
|
group: << .Group >>
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
dispatch:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4 # needed to read the prompt file
|
|
- name: Dispatch << .Role >>
|
|
env:
|
|
GH_TOKEN: ${{ secrets.<< .TokenSecret >> || github.token }}
|
|
HAS_TOKEN: ${{ secrets.<< .TokenSecret >> != '' }}
|
|
REPO: ${{ github.repository }}
|
|
RUN_NUMBER: ${{ github.run_number }}
|
|
run: |
|
|
if [ "$HAS_TOKEN" != "true" ]; then
|
|
echo "<< .TokenSecret >> is not set — skipping (the agent ignores bot @mentions)."
|
|
exit 0
|
|
fi
|
|
PROMPT=".github/loop/prompts/<< .Role >>.md"
|
|
if [ ! -f "$PROMPT" ]; then
|
|
echo "missing $PROMPT — run 'micro loop init'." >&2
|
|
exit 1
|
|
fi
|
|
ISSUE_URL=$(gh issue create --repo "$REPO" \
|
|
--title "<< .IssueTitle >> #$RUN_NUMBER" \
|
|
--body "Autonomous << .Role >> pass. Direction: .github/loop/NORTH_STAR.md; queue: .github/loop/PRIORITIES.md.")
|
|
ISSUE_NUM="${ISSUE_URL##*/}"
|
|
echo "Opened issue #$ISSUE_NUM — dispatching << .Role >>."
|
|
# The prompt file is the policy; strip its editorial <!-- --> header and
|
|
# substitute the tracking issue number (__ISSUE__) at runtime.
|
|
{
|
|
echo "<< .AgentMention >>"
|
|
echo
|
|
sed -e '/<!--/,/-->/d' -e "s/__ISSUE__/$ISSUE_NUM/g" "$PROMPT"
|
|
} > "$RUNNER_TEMP/loop-body.md"
|
|
gh issue comment "$ISSUE_NUM" --repo "$REPO" --body-file "$RUNNER_TEMP/loop-body.md"
|