Skip to content

ci: align workflow push/pull_request triggers with shared structure#262

Open
Shreyas-Microsoft wants to merge 2 commits into
demofrom
chore/align-workflow-triggers-with-mace
Open

ci: align workflow push/pull_request triggers with shared structure#262
Shreyas-Microsoft wants to merge 2 commits into
demofrom
chore/align-workflow-triggers-with-mace

Conversation

@Shreyas-Microsoft
Copy link
Copy Markdown
Collaborator

Purpose

  • Aligns the on: block (push + pull_request) of all CI/CD workflows on demo to the shared shape used by the Multi-Agent Custom Automation Engine Solution Accelerator docker-build-and-push.yml reference:

    on:
      push:
        branches:
          - main
          - dev
          - demo
          - hotfix
        paths:
          - ...
      pull_request:
        types:
          - opened
          - ready_for_review
          - reopened
          - synchronize
        branches:
          - main
          - dev
          - demo
          - hotfix
        paths:
          - ...
  • Fixes the underlying issue that several workflows were not triggering on push / PR to demo (or hotfix) because their branches: lists were limited to [main, dev] or [dev], and several pull_request triggers were missing the explicit types: block (so e.g. ready_for_review did not start them).

  • Each workflows existing paths: filter is preserved verbatim (only the branches list, types list, and missing event were added) so the set of files that triggers each workflow is unchanged — only the set of branches it triggers on is widened.

Workflows updated

Workflow Before After
ci.yml (Validate Deployment) push [main, dev, demo], PR [dev], no PR types push [main, dev, demo, hotfix], PR [main, dev, demo, hotfix] + types
deploy-v2.yml (Deploy-Test-Cleanup v2) push [main, dev, demo], PR [dev], no PR types push [main, dev, demo, hotfix], PR [main, dev, demo, hotfix] + types
test.yml (Tests + Coverage) push & PR [main, dev] push & PR [main, dev, demo, hotfix]
pylint.yml (PyLint) push only, no branches: filter at all push [main, dev, demo, hotfix] + mirror PR block with types/branches/paths
validate-bicep-params.yml PR [main, dev], no types PR [main, dev, demo, hotfix] + types (schedule + workflow_dispatch untouched)

Workflows intentionally left untouched

  • docker-build-and-push.yml — already conforms to the reference structure (branches [main, dev, demo, hotfix], PR types, paths filter).
  • pr-title-checker.yml — uses pull_request_target deliberately (so it works on fork PRs); not a push/pull_request workflow.
  • broken-links-checker.yml — intentionally runs on any PR that touches **/*.md with no branch filter (so doc-only PRs from any branch get checked); steps are gated on pull_request / workflow_dispatch and adding a push trigger would just produce noisy no-op runs.
  • azd-template-validation.yml, azure-dev.yml, Create-Release..yml, deploy-orchestrator.yml, job-*.yml, stale-bot.yml — have no push: / pull_request: triggers at all (they are scheduled, manually-dispatched, or reusable callable workflows).

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • All five edited workflow files (ci.yml, deploy-v2.yml, test.yml, pylint.yml, validate-bicep-params.yml) are still valid YAML and load cleanly (sanity-checked locally with yaml.safe_load).
  • The branches list on both push: and pull_request: in each edited workflow is exactly [main, dev, demo, hotfix].
  • Every pull_request: block has types: [opened, ready_for_review, reopened, synchronize].
  • Existing paths: filters are unchanged in each workflow (only widened by trigger surface, not by file set).
  • After merging, pushing a commit (or opening / re-opening / marking-ready a PR) to demo actually starts the expected workflow runs — this is the main behavioural payoff of the PR.

Other Information

  • This PR is targeted at demo (not main) per the request, so the new triggers can be observed in pipeline runs without affecting main first.
  • If everything looks correct here, the same change should be ported to main afterwards so the trigger contracts stay consistent across branches.

Aligns the on: blocks across CI/CD workflows to match the structure used
by the Multi-Agent Custom Automation Engine Solution Accelerator
docker-build-and-push.yml reference workflow:

  on:
    push:
      branches: [main, dev, demo, hotfix]
      paths: [...]
    pull_request:
      types: [opened, ready_for_review, reopened, synchronize]
      branches: [main, dev, demo, hotfix]
      paths: [...]

Workflows updated:
- ci.yml: PR branches widened from [dev] to [main, dev, demo, hotfix];
  push branches extended with hotfix; PR types added.
- deploy-v2.yml: PR branches widened from [dev] to [main, dev, demo,
  hotfix]; push branches extended with hotfix; PR types added.
- test.yml: push and PR branches extended with demo and hotfix.
- pylint.yml: branches filter added to push (was running on every push);
  full pull_request block added so linting also runs on PRs.
- validate-bicep-params.yml: PR branches extended with demo and hotfix;
  PR types added.

docker-build-and-push.yml already followed the pattern and was left
untouched. Workflows that intentionally use only pull_request_target,
schedule, or workflow_dispatch (pr-title-checker, stale-bot,
broken-links-checker, etc.) were left untouched.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
TOTAL309720893% 
report-only-changed-files is enabled. No files were changed during this commit :)

Tests Skipped Failures Errors Time
588 0 💤 0 ❌ 0 🔥 21.599s ⏱️

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

Coverage

Processor Coverage Report •
FileStmtsMissCoverMissing
TOTAL572772087% 
report-only-changed-files is enabled. No files were changed during this commit :)

Tests Skipped Failures Errors Time
812 0 💤 0 ❌ 0 🔥 18.144s ⏱️

Copy link
Copy Markdown
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

Aligns CI/CD workflow trigger contracts on the demo branch to a shared structure so workflows reliably run for push and pull_request events across main/dev/demo/hotfix, including explicit PR event types (e.g., ready_for_review).

Changes:

  • Expanded push.branches filters to include demo and hotfix where missing.
  • Standardized pull_request triggers to include explicit types: [opened, ready_for_review, reopened, synchronize] and a consistent base-branch allowlist.
  • Preserved existing paths filters while widening the triggering surface to the intended branches.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/ci.yml Adds hotfix for push and standardizes PR trigger (types + branches) to include main/dev/demo/hotfix.
.github/workflows/deploy-v2.yml Adds hotfix for push and standardizes PR trigger (types + branches) to include main/dev/demo/hotfix.
.github/workflows/test.yml Expands push/PR branch filters to include demo and hotfix (PR types already present).
.github/workflows/pylint.yml Adds explicit push branch filter and adds PR trigger with matching types, branches, and paths.
.github/workflows/validate-bicep-params.yml Expands PR branch filters to include demo and hotfix and adds explicit PR types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
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

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Comment on lines 44 to +46
run: |
echo "Running Pylint..."
python -m flake8 --config=.flake8 --verbose . No newline at end of file
python -m flake8 --config=.flake8 --verbose .
Comment on lines 43 to +46
- name: Pylint
run: |
echo "Running Pylint..."
python -m flake8 --config=.flake8 --verbose . No newline at end of file
python -m flake8 --config=.flake8 --verbose .
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