feat(P01): issue-to-contract workflow skeleton (T-2.3)
---ci--- phase: 1 milestone: v1.0 status: execute persona: backend-engineer task: T-2.3 requirements: covered: [REQ-12] ---/ci--- Wave 2, task T-2.3. contracts-repo/.gitea/workflows/issue-to-contract.yml is the reference copy kept in the acdl repo (Phase 04 pushes it to the actual acdl-contracts repo). Skeleton: on: issues [opened]; one job parse-and-trigger with explicit placeholder steps. The header comment documents the cross-repo trigger plan (workflow_dispatch API per D-014). Phase 04 implements the real step bodies (run l3b_agent_stub.py, commit contract.yaml to a new branch, close the issue, dispatch the pipeline).
This commit is contained in:
@@ -0,0 +1,40 @@
|
|||||||
|
# ACDL issue-to-contract workflow (Phase 01 skeleton, reference copy).
|
||||||
|
#
|
||||||
|
# This file is the source-of-truth copy kept in the `acdl` repo under
|
||||||
|
# contracts-repo/.gitea/workflows/. Phase 04 will push it to the actual
|
||||||
|
# `acdl-contracts` repo under .gitea/workflows/ and implement the real
|
||||||
|
# step bodies.
|
||||||
|
#
|
||||||
|
# Trigger: a new Issue is opened in acdl-contracts. The workflow runs
|
||||||
|
# l3b_agent_stub.py to map the Issue body to a contract.yaml, commits the
|
||||||
|
# contract to a new branch, closes the Issue, and triggers the main
|
||||||
|
# pipeline in the `acdl` repo via the workflow_dispatch API (D-014; Gitea
|
||||||
|
# Actions does not support repository_dispatch).
|
||||||
|
name: issue-to-contract
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
parse-and-trigger:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# Phase 04 will implement:
|
||||||
|
# 1. checkout acdl-contracts (so l3b_agent_stub.py is available).
|
||||||
|
# 2. run: python3 scripts/l3b_agent_stub.py "${{ gitea.event.issue.body }}" > contract.yaml
|
||||||
|
# 3. parse the generated contract; commit it to a new branch
|
||||||
|
# (e.g. contract/<issue-number>).
|
||||||
|
# 4. push the branch.
|
||||||
|
# 5. close the Issue with a comment linking to the pipeline run.
|
||||||
|
# 6. trigger the main pipeline:
|
||||||
|
# curl -X POST \
|
||||||
|
# -H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
# https://git.cloudinit.dev/api/v1/repos/continuous-intelligence/acdl/actions/workflows/<id>/dispatches \
|
||||||
|
# -d '{"ref":"milestone/v1.0-initial","inputs":{"contract-ref":"<branch>"}}'
|
||||||
|
- name: "Issue-trigger placeholder"
|
||||||
|
run: |
|
||||||
|
echo "issue-to-contract placeholder (Phase 01 skeleton)"
|
||||||
|
echo "Issue body: ${{ gitea.event.issue.body }}"
|
||||||
|
echo "Phase 04 will run l3b_agent_stub.py, commit contract.yaml, close issue, dispatch pipeline"
|
||||||
|
exit 0
|
||||||
Reference in New Issue
Block a user