-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Currently, each component repo in the Eclipse SCORE project maintains its own set of PR checks, referencing multiple workflows from the cicd-workflows repo. This results in duplicated workflow references and maintenance overhead.
Proposal
Goal:
Enable each component repo to use a single score-pr-checks workflow that references a reusable action in the cicd-workflows repo. This way, any update to the central workflow or action will automatically apply to all component repos, streamlining maintenance and rollout of new checks.
Design:
- Create a reusable workflow or composite action in
cicd-workflowscalledscore-pr-checks. - Each component repo will reference this workflow in their PR checks.
- New checks can be added centrally; all repos benefit immediately.
Initial Check: Bazel Module Name Regex
The first check to be included is a validation of the Bazel module name in the root MODULE.bazel file of each component repo.
Requirement:
The module name must match the following regex:
^score_[a-z_]+$
- Starts with
score_ - Followed by lowercase letters or underscores
Example Implementation (in cicd-workflows):
name: SCORE PR Checks
on:
workflow_call:
jobs:
bazel-module-name-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Validate Bazel module name
run: |
MODULE_NAME=$(grep '^module' MODULE.bazel | awk '{print $2}')
if [[ ! "$MODULE_NAME" =~ ^score_[a-z_]+$ ]]; then
echo "❌ Invalid module name: $MODULE_NAME"
exit 1
fi
echo "✅ Module name is valid: $MODULE_NAME"Usage in Component Repo:
name: SCORE PR Checks
on:
pull_request:
jobs:
pr-checks:
uses: eclipse-score/cicd-workflows/.github/workflows/score-pr-checks.yml@mainBenefits
- Single source of truth: All checks managed centrally.
- Easy rollout: New checks or updates apply to all repos instantly.
- Simplified maintenance: Component repos only need to reference one workflow.
Let us know if you have feedback or additional requirements!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status