Skip to content

Conversation

@haoruizhou
Copy link
Collaborator

No description provided.

- Add automated Docker build pipeline (.github/workflows/docker-build.yml)
- Add code quality checks (.github/workflows/code-quality.yml)
- Add deployment workflow (.github/workflows/deploy.yml)
- Add helper script to pull latest images (pull-latest-images.sh)
- Update README with CI/CD documentation
- Fix startup-data-loader service array syntax error
- Remove duplicate car-to-influx files that were moved to installer/
- These files are now properly located in installer/car-to-influx/
Updated code-quality and docker-build workflows to trigger via workflow_dispatch with configurable inputs, replacing push and pull_request triggers. Added input-based conditional logic to control which jobs and steps run, improving flexibility for manual workflow runs.
@haoruizhou haoruizhou requested a review from Copilot September 8, 2025 14:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive CI/CD infrastructure using GitHub Actions for automated building, testing, and deployment of the WFR DAQ system. It includes automated Docker image building to GitHub Container Registry, code quality checks, and removes old development files.

  • Adds three GitHub Actions workflows for building/testing, code quality checks, and deployment
  • Creates a helper script to pull pre-built Docker images from the registry
  • Updates documentation with detailed CI/CD pipeline information
  • Removes obsolete development files (HTML templates, Python scripts, build files, DBC files)

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/docker-build.yml Main CI/CD pipeline for building Docker images and running tests
.github/workflows/code-quality.yml Automated code quality checks using Hadolint and ShellCheck
.github/workflows/deploy.yml Manual deployment workflow for staging/production
installer/scripts/pull-latest-images.sh Helper script to pull pre-built images from GitHub Container Registry
installer/README.md Documentation updates explaining the new CI/CD pipeline and usage
Various deleted files Cleanup of old development files and templates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@@ -0,0 +1,48 @@
#!/bin/bash
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script is missing a proper shebang error handling pattern. Consider adding set -euo pipefail after the shebang for more robust error handling, which will exit on any error, undefined variables, and pipe failures.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +7
branches: [ deploy ]
pull_request:
branches: [ deploy ]
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow only triggers on the 'deploy' branch, but based on the documentation in README.md which mentions 'main'/'develop' branches, this seems inconsistent. Consider aligning the trigger branches with the documented workflow or updating the documentation.

Suggested change
branches: [ deploy ]
pull_request:
branches: [ deploy ]
branches: [ main, develop, deploy ]
pull_request:
branches: [ main, develop, deploy ]

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +56
echo "tags=${{ env.REGISTRY }}/${IMAGE_NAME_LOWER}/${{ matrix.service }}:latest" >> $GITHUB_OUTPUT
echo "tags=${{ env.REGISTRY }}/${IMAGE_NAME_LOWER}/${{ matrix.service }}:${{ github.sha }}" >> $GITHUB_OUTPUT
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both tag assignments write to the same 'tags' output key, causing the second assignment to overwrite the first. The Docker build will only use the SHA tag, not the 'latest' tag. Use different output keys or combine them into a multi-line value.

Suggested change
echo "tags=${{ env.REGISTRY }}/${IMAGE_NAME_LOWER}/${{ matrix.service }}:latest" >> $GITHUB_OUTPUT
echo "tags=${{ env.REGISTRY }}/${IMAGE_NAME_LOWER}/${{ matrix.service }}:${{ github.sha }}" >> $GITHUB_OUTPUT
echo -e "tags=${{ env.REGISTRY }}/${IMAGE_NAME_LOWER}/${{ matrix.service }}:latest\n${{ env.REGISTRY }}/${IMAGE_NAME_LOWER}/${{ matrix.service }}:${{ github.sha }}" >> $GITHUB_OUTPUT

Copilot uses AI. Check for mistakes.
@haoruizhou haoruizhou merged commit 926fa82 into main Sep 8, 2025
13 checks passed
@haoruizhou haoruizhou deleted the deploy branch September 8, 2025 14:57
haoruizhou added a commit that referenced this pull request Sep 8, 2025
Adding GitHub Actions for code quality check and docker build
haoruizhou added a commit that referenced this pull request Nov 13, 2025
Adding GitHub Actions for code quality check and docker build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants