Files
acdl/contracts-repo/.gitea/workflows/issue-to-contract.yml
T
Jon Chery b953fd4a8e docs(P01): complete repo-scaffolding phase
---ci---
phase: 1
milestone: v1.0
status: complete
requirements:
  covered: [REQ-01, REQ-09]
  partial: [REQ-10, REQ-12]
---/ci---

Squash merge of phase/01-repo-scaffolding into milestone/v1.0-initial.
Phase 01 ships the three-repo scaffold (acdl, acdl-contracts, acdl-evidence),
the placeholder index.html on acdl-evidence (D-012/D-016 raw-URL substitute
for unsupported Gitea Pages), the qa + prod branches on acdl-contracts
(D-013 stand-in for unsupported Gitea environments), the workflow skeletons
(pipeline.yml + issue-to-contract.yml), and the idempotent setup + verify
scripts. REQ-10/12 remain partial pending Phase 04 full implementation.
2026-07-21 13:10:50 +00:00

40 lines
1.8 KiB
YAML

# 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