Does a Pipeline Belong to the Repository or to the Project?
The YAML is a code file, the pipeline definition is the object that decides which inputs and triggers run it, and the run history is what actually happened. Separating the three makes ownership of shared checks and production deploys clear, and lets you reconstruct past deploys after operations responsibility moves.
A shared repository has one file, ci/release.yml. Both the development team and the operations team read it. The operations team registers this file in its own project. Should the production deploy now show up in the development team's pipeline list too?
To answer, split what we have been calling "the pipeline" into three things. The YAML is a code file. The pipeline definition is the object that decides which inputs and triggers run that file. The run history is the record of what actually happened at a given moment. One file can back several registered definitions.
Pipeline ownership follows the definition that registered the file, not the YAML file itself. Two definitions reading the same file produce runs with different owners.
How does one file branch into separate run histories?
A shared check registered on the repository and a production deploy registered on the operations project read the same file but produce different runs. Drawn out (run numbers are illustrative):
CI file in the shared repository (ci/release.yml)
│ │
▼ ▼
Repository CI · shared check Ops project CI · prod deploy
│ │
▼ ▼
Check run #81 Prod run #54
│ │ │
(read allowed) (read allowed) (prod log permission)
▼ ▼ ▼
Dev project Ops project ◀────────────┘
screen screenIf every team wants the same push-check result, register the check definition once on the repository. The dev screen and the ops screen both point to the same run, #81. If the approval steps and deploy targets are used only by operations, register a separate definition on the operations project. Even though it reads the same YAML, the ownership of production run #54 is unambiguous. If both definitions subscribe to the same event, each produces its own run, so check the trigger configuration as well. Which layer variables and secrets belong to is covered in where repository variables, secrets, and branch rules should live.
Explaining last month's deploy after the ops team changes
Say operations responsibility moves to a different project next quarter. If the new project simply creates a pipeline with the same name, last month's prod deploy and this month's prod deploy become hard to tell apart. Pin down the run ID, the owning scope at the time, the definition ID, the commit of the file used, the version of the inputs, and the actual deploy target when recording each run, and you can reconstruct the original event even after the handover. For secrets, record the reference and version, not the value. Pinning reusable workflows to a specific commit SHA is also recommended in GitHub's security hardening guide for Actions.
When should triggers switch during a handover?
At handover, also decide when the old trigger stops and the new one starts, so the same push isn't picked up by both sides and turned into two production deploys. If the new team later needs past history, grant read access formally. When last month's deploy records both who owned it then and who may read it today, you have handled the responsibility transfer and audit-trail preservation at the same time.
- #cicd
- #pipelines
- #permissions
- #traceability
- #audit