Skip to content

Add post-deploy workflow validation via GitHub Actions API #287

Closed

Description

@neuromechanist

Context

Follow-up from PR #286 review (Issue #285). After deploying workflows via createOrUpdateFile, there is no verification that GitHub Actions can actually parse the YAML. The Contents API accepts any file content; syntax errors only surface when the workflow triggers.

Proposed Solution

After deploying all workflows in deployWorkflows(), call the GitHub Actions list workflows API to verify each deployed workflow is parseable:

const listResponse = await fetch(
  `${GITHUB_API}/repos/${ORG_NAME}/${repo}/actions/workflows`,
  { headers: { Authorization: `Bearer ${pat}`, ... } }
);
const { workflows: ghWorkflows } = await listResponse.json();
for (const w of workflows) {
  const found = ghWorkflows.find(gw => gw.path === w.path);
  if (!found) {
    errors.push(`${w.path}: deployed but GitHub Actions cannot parse it`);
  }
}

The Actions list workflows API only returns parseable workflows, so absence from this list after deployment reliably indicates a parse error.

Notes

Activity

  1. neuromechanist commented on May 14, 2026

    @neuromechanist
    ContributorAuthor

    Merged via PR #469.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions