Skip to content

Add: Salesforce CI/CD reusable workflows (sf-validate, sf-deploy) - #6

Merged
gambe94 merged 15 commits into
mainfrom
feat/sf-cicd-workflows
Jul 12, 2026
Merged

Add: Salesforce CI/CD reusable workflows (sf-validate, sf-deploy)#6
gambe94 merged 15 commits into
mainfrom
feat/sf-cicd-workflows

Conversation

@gambe94

@gambe94 gambe94 commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

What

A complete reusable Salesforce CI/CD layer, callable from any repo in the org with ~15 lines of YAML per workflow:

  • sf-org-login (composite) — org auth from an SFDX auth-URL GitHub secret, zero cloud dependencies, if: always() cleanup
  • sf-delta-package (composite) — sfdx-git-delta wrapper with has-changes/component-count outputs and a component table for PR comments
  • sf-validate.yml (reusable) — delta check-only deploy with tests against the target org, Code Analyzer on changed files (nested call to the existing reusable workflow), optional scratch-org validation, sticky PR comment, sf-validate-<run> audit artifact carrying the quick-deploy handoff (validation.json)
  • sf-deploy.yml (reusable) — deploy bound to a caller GitHub Environment (reviewer gates apply), GitHub Deployment record linking the Salesforce deploy request, quick deploy of the PR-validated request with delta → full fallbacks, JUnit export, sf-deploy-<env>-<run> audit artifact
  • docs/consuming-sf-cicd.md quickstart, examples/sf-validate.yml + examples/sf-deploy.yml, README/CLAUDE.md entries

Notes

  • Composite actions are referenced from the reusable workflows at @main (they resolve against the caller's checkout) — same documented version-skew caveat as sf-jwt-loginget-aws-secret. The refs resolve once this PR merges.
  • Runs in gforceinnovation/sf-ci by default (container-image input).
  • No TypeScript changes; sf-jwt-login/get-aws-secret untouched.

Verification

  • npm run all green (format, lint, typecheck, bundle, test, dist:verify)
  • actionlint clean across all workflows
  • End-to-end verification happens from the first caller repo (sfdx_template_enterprise) after this merges and v1.2.0 is tagged

After merge

Tag v1.2.0release.yml publishes the release and moves v1.

🤖 Generated with Claude Code

gambe94 and others added 5 commits July 12, 2026 18:29
Authenticate to a Salesforce org from an SFDX auth URL held in a GitHub
secret — no cloud dependency. Outputs org-id, username, instance-url;
auth file cleaned up in an if: always() step. JSON parsed with node so
the action works inside any container that ships the SF CLI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wrap sfdx-git-delta: delta package.xml between two refs with
has-changes/component-count outputs, a component table in the step
summary and components.md for downstream PR comments. Installs the
plugin on the fly when missing (preinstalled in gforceinnovation/sf-ci).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Salesforce PR validation: delta package, check-only deploy with tests
against the target org (validation.json quick-deploy handoff), Code
Analyzer on changed files via the existing reusable workflow, optional
scratch-org validation, sticky PR comment, sf-validate-<run> audit
artifact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gated deploy bound to a caller GitHub Environment: GitHub Deployment
record with the Salesforce deploy-request URL, quick deploy of the
PR-validated request (merge commit -> PR -> validation artifact lookup)
with delta and full-deploy fallbacks, JUnit test export and the
sf-deploy-<env>-<run> audit artifact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gambe94 and others added 10 commits July 12, 2026 20:28
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…Access)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ort drift

Task 1 added findRelevantTests exports to @gforce/core but never re-ran
`npm run bundle:all`, so the committed dist/index.js for these two actions
predated that change and failed `npm run dist:verify`. No source changed;
this is a mechanical ncc re-bundle to match already-merged core.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…eploy

PR events validate the delta against the target org with auto-selected
tests and save the deploy request id; push/dispatch events quick-deploy
the validated request behind the caller's environment gate, with
delta -> full fallbacks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…workflow layer

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gambe94
gambe94 merged commit f5f5da6 into main Jul 12, 2026
1 check passed
@gambe94
gambe94 deleted the feat/sf-cicd-workflows branch July 12, 2026 22:23
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