-
Notifications
You must be signed in to change notification settings - Fork 1
Adding GitHub Actions for code quality check and docker build #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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.
This reverts commit 5c62ee1.
There was a problem hiding this 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 | |||
Copilot
AI
Sep 8, 2025
There was a problem hiding this comment.
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.
| branches: [ deploy ] | ||
| pull_request: | ||
| branches: [ deploy ] |
Copilot
AI
Sep 8, 2025
There was a problem hiding this comment.
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.
| branches: [ deploy ] | |
| pull_request: | |
| branches: [ deploy ] | |
| branches: [ main, develop, deploy ] | |
| pull_request: | |
| branches: [ main, develop, deploy ] |
| 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 |
Copilot
AI
Sep 8, 2025
There was a problem hiding this comment.
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.
| 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 |
Adding GitHub Actions for code quality check and docker build
Adding GitHub Actions for code quality check and docker build
No description provided.