-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Checklist
- I've read the contribution guidelines.
- I've searched other issues and no duplicate issues were found.
- I've agreed with the maintainers that I can plan this task.
Description
Enhance the sync-files workflow to automatically generate a GitHub Actions workflow that prevents modification of synced files in the target repository. This will ensure consistency and integrity by disallowing changes to files synced from the source repository (repo A) in the target repository (repo B).
The newly generated workflow will utilize the Ensure Files Changed GitHub Action to fail checks if modifications are detected in the list of synced files. The sync-files job will dynamically update the list of synced files in this workflow every time it runs.
Purpose
The purpose of this feature is to automate the enforcement of file integrity in the target repository. By preventing changes to synced files, we maintain alignment between the source and target repositories without manual intervention. This approach ensures:
- Synced files remain unchanged unless updated by the
sync-filesjob. - The integrity of the sync process is preserved.
- Unintentional or unauthorized modifications to synced files are prevented without bypassing the required status checks.
Possible approaches
-
Generate Workflow Automatically:
- When the
sync-filesjob completes, it generates or updates a workflow YAML file in the target repository. - This workflow uses the
Ensure Files Changedaction to validate that no synced files have been modified.
- When the
-
Dynamic List Management:
- The
sync-filesjob dynamically updates the list of synced files in the generated workflow file.
- The
-
Enforce Workflow Runs:
- Configure the rulesets to ensure the generated workflow must pass before changes can be merged.
Definition of done
- Implement logic in the
sync-filesjob to generate or update a GitHub Actions workflow file in the target repository. - Include the
Ensure Files Changedaction in the generated workflow to validate file integrity. - Ensure the generated workflow is automatically updated with the latest list of synced files whenever the
sync-filesjob runs. - Validate the workflow is triggered during pull requests to prevent modifications to synced files.
- Test and confirm that attempts to modify synced files result in failed status checks unless bypassed.
cc. @mitsudome-r
Metadata
Metadata
Assignees
Labels
Type
Projects
Status