Skip to content

Add JS stack build workflows - #26

Merged
nolanpro merged 19 commits into
mainfrom
js-builds-2
Sep 22, 2026
Merged

nolanpro merged 19 commits into
mainfrom
js-builds-2

Conversation

@nolanpro

Copy link
Copy Markdown
Contributor

Summary

  • Add the reusable JS package workflow and stack build script so package repos can build @processmaker/* tarballs in dependency order.
  • Teach the PM4 deploy workflow to pass that stack through CI image builds.

Test plan

  • After the rebased js-builds-2 branch is force-pushed, confirm this PR is up to date with main
  • Open a package PR that uses js-package.yml and confirm the stack workflow runs

Made with Cursor

nolanpro and others added 19 commits September 22, 2026 14:21
When called from screen-builder, actions/checkout defaults to the caller
repo, so js-stack-build.sh was missing. Checkout the workflow source repo
using github.workflow_sha instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
github.workflow_sha resolves to the caller repo commit when triggered
via workflow_dispatch, so pin the config repo branch instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
workflow_dispatch passes github.ref as refs/heads/<branch>, which breaks
git clone --branch and can confuse the contents API.

Co-authored-by: Cursor <cursoragent@cursor.com>
Downstream repos like modeler were resolving to default branch (develop)
which lacks processmaker metadata. Accept trigger_branch and reuse it when
the branch exists on the target repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
Shallow clones cannot checkout arbitrary SHAs. Use a full clone for commit
refs and harden fetch_package_json when the contents API returns nothing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use the GitHub raw contents API instead of base64 decoding, and read
processmaker.command from package.json in the cloned repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use a single jq call in get_downstream so stdin is not consumed twice,
write branch_map to a file to avoid GHA expression brace mangling, and
encode pr_body with toJSON so multiline ci: tags survive reusable workflow inputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
The ${BRANCH_MAP:-{}} default appended a stray } to exported JSON, and
ci_map entries need object braces for jq -s add rather than from_entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
Branches like modeler ci-test still use processmaker.build.command and
downstream; accept either format and skip missing downstream when scanning.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop legacy processmaker.build schema and per-package command config; auto-detect build-bundle from package scripts instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
Run the full command from package metadata when set; otherwise default to npm run build-bundle.

Co-authored-by: Cursor <cursoragent@cursor.com>
Export REBUILD_CACHE and DOCKER_BUILD_NO_CACHE when the PR body contains
ci:no-cache so CI image builds skip cached Docker layers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nolanpro
nolanpro merged commit 3d0fc3e into main Sep 22, 2026
5 of 7 checks passed
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.

1 participant