Merged
Conversation
Reviewer's GuideThis PR introduces a set of parameterized, reusable GitHub Actions workflows for build, test, and deploy tasks, adds dedicated documentation for these templates, and updates the project README to reference the new templates directory and usage guide. Flow diagram for build.yml reusable workflow logicflowchart TD
Start([Start]) --> Checkout[Checkout code]
Checkout --> CheckDotnet{dotnet input?}
CheckDotnet -- Yes --> SetupDotnet[Setup .NET]
SetupDotnet --> BuildDotnet[Build .NET project]
CheckDotnet -- No --> CheckPython{python input?}
BuildDotnet --> CheckPython
CheckPython -- Yes --> SetupPython[Setup Python]
SetupPython --> InstallPyDeps[Install Python dependencies]
InstallPyDeps --> BuildPyWheel[Build Python wheel]
BuildPyWheel --> CheckNode{node input?}
CheckPython -- No --> CheckNode
CheckNode -- Yes --> SetupNode[Setup Node]
SetupNode --> InstallNodeDeps[Install Node dependencies]
InstallNodeDeps --> BuildNode[Build Node package]
BuildNode --> End([End])
CheckNode -- No --> End
Flow diagram for deploy.yml reusable workflow logicflowchart TD
Start([Start]) --> Checkout[Checkout code]
Checkout --> CheckRegistry{registry input?}
CheckRegistry -- Yes --> LoginRegistry[Log in to registry]
LoginRegistry --> BuildPush[Build and push Docker image]
CheckRegistry -- No --> BuildPush
BuildPush --> DeployAzure[Deploy to Azure Web App]
DeployAzure --> End([End])
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @Bryan-Roe - I've reviewed your changes - here's some feedback:
- Add caching steps (e.g., actions/cache) for NuGet, pip, and npm dependencies in the build/test templates to speed up CI runs.
- Parameterize the project directory paths as inputs so the templates can be reused in repos with different structures without modification.
- Update the Docker build/push step to include a slash between registry and image name (e.g.,
${{ inputs.registry }}/${{ inputs.image_name }}) to avoid invalid image tags.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Add caching steps (e.g., actions/cache) for NuGet, pip, and npm dependencies in the build/test templates to speed up CI runs.
- Parameterize the project directory paths as inputs so the templates can be reused in repos with different structures without modification.
- Update the Docker build/push step to include a slash between registry and image name (e.g., `${{ inputs.registry }}/${{ inputs.image_name }}`) to avoid invalid image tags.
## Individual Comments
### Comment 1
<location> `.github/workflows/templates/deploy.yml:25` </location>
<code_context>
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Build and push image
+ run: |
+ docker build -t ${{ inputs.registry }}${{ inputs.image_name }}:${{ inputs.tag }} .
</code_context>
<issue_to_address>
Image tag construction may result in invalid image names if 'registry' input is empty.
Normalize 'inputs.registry' to ensure it ends with a slash, or handle cases where it does not, to prevent invalid image names.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull Request Overview
This PR adds reusable GitHub Actions workflow templates to streamline CI/CD operations across the project. The templates support build, test, and deployment automation for .NET, Python, and Node.js projects.
- Added three reusable workflow templates (build.yml, test.yml, deploy.yml) with configurable language support
- Created comprehensive documentation explaining template usage and examples
- Updated project structure documentation to reference the new automation templates
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/REUSABLE_AUTOMATION_TEMPLATES.md | Documentation for the new reusable workflow templates with usage examples |
| README.md | Updated project structure and contribution sections to reference automation templates |
| .github/workflows/templates/test.yml | Reusable test workflow supporting .NET, Python, and Node.js projects |
| .github/workflows/templates/deploy.yml | Reusable deployment workflow for Docker images to Azure App Service |
| .github/workflows/templates/build.yml | Reusable build workflow supporting multiple language ecosystems |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Bryan <74067792+Bryan-Roe@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Bryan <74067792+Bryan-Roe@users.noreply.github.com>
Signed-off-by: Bryan <74067792+Bryan-Roe@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
REUSABLE_AUTOMATION_TEMPLATES.mdTesting
pytest -q(fails: ModuleNotFoundError: No module named 'watchdog')https://chatgpt.com/codex/tasks/task_e_6886a74486cc8322b58c543ba0b7873a
Summary by Sourcery
Introduce reusable GitHub Actions templates for build, test, and deploy pipelines and update documentation to guide their usage
New Features:
Documentation: