|
| 1 | +# Updating TOC TAG and TOC SubProject README Files |
| 2 | + |
| 3 | +This document outlines the process for updating the README files located in the [tags](https://github.com/cncf/toc/tree/main/tags) and [toc_subprojects](https://github.com/cncf/toc/tree/main/toc_subprojects) directories. These README files are automatically generated and updated based on the content of the [`tags.yaml`](https://github.com/cncf/toc/blob/main/tags.yaml) file. |
| 4 | + |
| 5 | +## **The Single Source of Truth: `tags.yaml`** |
| 6 | + |
| 7 | +The `tags.yaml` file serves as the central source of information for generating and updating the README files for both TAGs and TOC SubProjects. To modify the content of these READMEs, you **must** update the `tags.yaml` file directly. |
| 8 | + |
| 9 | +## **Who can Update:** |
| 10 | + |
| 11 | +Anyone can create a pull request in the `cncf/toc` repository, only TOC members can review and merge changes to the `tags.yaml` file. |
| 12 | + |
| 13 | +## **How to Update:** |
| 14 | + |
| 15 | +1. **Locate the `tags.yaml` file:** This file is located at the root of the `cncf/toc` repository: [https://github.com/cncf/toc/blob/main/tags.yaml](https://github.com/cncf/toc/blob/main/tags.yaml). |
| 16 | + |
| 17 | +2. **Make your changes:** Carefully edit the `tags.yaml` file to reflect the desired updates for the TAG or subproject README files. Ensure the YAML syntax is correct. |
| 18 | + |
| 19 | +3. **Create a Pull Request (PR):** |
| 20 | + * **Important:** A PR that aims to update the TAG and subproject README files **must only contain changes to the `tags.yaml` file.** Any other changes in the PR will not trigger the automatic README updates. |
| 21 | + |
| 22 | +## **Automation in Action:** |
| 23 | + |
| 24 | +The `github-project-automation` and `cncf-automation-bot` handle the automatic updates of the README files based on your changes to `tags.yaml`: |
| 25 | + |
| 26 | +* **Updates from a Branch within the `cncf/toc` Repository:** |
| 27 | + * When you create a PR from a branch within the `cncf/toc` repository that modifies only the `tags.yaml` file, the `github-project-automation` will automatically: |
| 28 | + * Generate the necessary updates to the relevant README files in the `tags` and `toc_subprojects` directories. |
| 29 | + * Push these updated README files as an **additional commit** to your existing PR. |
| 30 | + |
| 31 | +* **Updates from a Fork of the `cncf/toc` Repository:** |
| 32 | + * If you create a PR from a fork of the `cncf/toc` repository that modifies only the `tags.yaml` file, the `cncf-automation-bot` will: |
| 33 | + * Create a **new PR** on the `cncf/toc` repository. |
| 34 | + * This new PR will contain both your changes to the `tags.yaml` file and the automatically generated updates to the relevant README files. |
| 35 | + * The `cncf-automation-bot` will automatically close the original PR from your fork and add comments to both the original and the new PR to link them. |
| 36 | + |
| 37 | +## **Key Takeaway:** |
| 38 | + |
| 39 | +To update the README files in the `tags` and `toc_subprojects` directories, your PR **must only include modifications to the `tags.yaml` file**. The automation will then take care of generating and updating the corresponding README files. |
0 commit comments