Skip to content

ci: split CI into reusable workflows with an orchestrator - #65

Merged
Primajin merged 1 commit into
mainfrom
ci/reusable-workflows
Aug 20, 2026
Merged

ci: split CI into reusable workflows with an orchestrator#65
Primajin merged 1 commit into
mainfrom
ci/reusable-workflows

Conversation

@Primajin

Copy link
Copy Markdown
Owner

Refactors the monolithic ci.yml into per-purpose reusable workflows (_test, _lint, _pr-title, _preview, _console, _screenshots, each on: workflow_call) orchestrated by ci.yml, which calls them as jobs and aggregates results into the single All checks green gate — mirroring the dcd-monorepo pattern (reusable phases + inline aggregator). The gh-pages concurrency lives inside _preview.yml (invoked only on PRs). Behaviour and the required All checks green context are unchanged.

Refactor the monolithic ci.yml into per-purpose reusable workflows
(_test, _lint, _pr-title, _preview, _console, _screenshots), each `on:
workflow_call`, orchestrated by ci.yml which calls them as jobs and aggregates
their results into the single `All checks green` gate. Mirrors the
dcd-monorepo pattern (reusable phases + inline aggregator). Behaviour and the
required "All checks green" context are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 20, 2026 13:13
@Primajin
Primajin temporarily deployed to pr-preview/pr-65 August 20, 2026 13:13 — with GitHub Actions Inactive
@Primajin

Copy link
Copy Markdown
Owner Author

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-20 13:16 UTC

@github-actions

Copy link
Copy Markdown
Contributor

Console Logs

✅ No logs were captured

@github-actions

Copy link
Copy Markdown
Contributor

@Primajin
Primajin merged commit e61bd34 into main Aug 20, 2026
15 checks passed
@Primajin
Primajin deleted the ci/reusable-workflows branch August 20, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refactors the repository’s GitHub Actions CI pipeline by splitting the previously monolithic .github/workflows/ci.yml into multiple reusable workflows (_*.yml) and turning ci.yml into an orchestrator that runs those phases and preserves the single required “All checks green” gate.

Changes:

  • Replaced inline job definitions in ci.yml with reusable-workflow calls for test, lint, PR title, preview deploy, console logs, and screenshots.
  • Added reusable workflows for each CI phase (_test, _lint, _pr-title, _preview, _console, _screenshots).
  • Kept the “All checks green” aggregator job as the single status gate while allowing individual phase jobs to be skipped without failing the gate.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.github/workflows/ci.yml Orchestrates reusable workflows and aggregates results into the “All checks green” gate.
.github/workflows/_test.yml Reusable workflow for Node install + coverage + Codecov upload.
.github/workflows/_lint.yml Reusable workflow for linting and auto-fix (incl. GPG setup).
.github/workflows/_pr-title.yml Reusable workflow for PR title syncing + semantic PR title validation.
.github/workflows/_preview.yml Reusable workflow to build and deploy PR previews with gh-pages concurrency control.
.github/workflows/_console.yml Reusable workflow to poll preview URL and collect console logs.
.github/workflows/_screenshots.yml Reusable workflow to poll preview URL and capture screenshots + upload artifacts.
Suppressed comments (2)

.github/workflows/ci.yml:66

  • secrets: inherit is unnecessary for this job and broadens secret exposure to the called workflow (which runs third-party actions). Prefer github.token in the reusable workflow and avoid inheriting all secrets here.
    uses: ./.github/workflows/_screenshots.yml
    secrets: inherit

.github/workflows/_pr-title.yml:103

  • Use github.token for the semantic PR action instead of secrets.GITHUB_TOKEN so this reusable workflow doesn't require inheriting secrets from the caller.
      - uses: amannn/action-semantic-pull-request@v6
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci.yml
Comment on lines +36 to +37
uses: ./.github/workflows/_pr-title.yml
secrets: inherit
Comment thread .github/workflows/ci.yml
Comment on lines +45 to +46
uses: ./.github/workflows/_preview.yml
secrets: inherit
Comment thread .github/workflows/ci.yml
Comment on lines +55 to +56
uses: ./.github/workflows/_console.yml
secrets: inherit
Comment on lines +13 to +16
- uses: actions/github-script@v9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Comment on lines +37 to +43
- name: Use WebApp Console Log Action
uses: Primajin/webapp-console-log-action@v1.8.2
with:
webapp-url: ${{ env.PREVIEW_URL }}
regexp-error: 'Failed \D+ 404 \(\)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +37 to +47
- name: screenshots-ci-action
uses: Primajin/screenshots-ci-action@v3
with:
devices: iPhone 13,iPad Pro,iPad Pro landscape
fullPage: false
noDesktop: true
releaseId: 315671617
type: png
url: ${{ env.PREVIEW_URL }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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