CI Failure: Build brand outputs #7

Closed
opened 2026-02-26 23:13:44 -08:00 by ci · 3 comments

CI Failure Report

Workflow: Build brand outputs
Commit: c4f518ee31
Run: https://git.brads.house/brad/brand-guidelines/actions/runs/4

Triage Analysis

Root Cause

The workflow fails at the git commit step with:

fatal: pathspec 'assets/swatches/' did not match any files
⚙️ [runner]: exitcode '128': failure

What Happened

  1. Build pipeline runs successfully and generates brand.json, brand.css, BRAND.md, and exports
  2. No MCP_TOKEN is configured in the repo, so swatch generation is skipped (warning: ⚠ No MCP_TOKEN — skipping swatch generation)
  3. The assets/swatches/ directory is never created or is empty
  4. The workflow tries to run git add assets/swatches/ which fails because the path does not exist

Log Excerpt

2026-02-27T07:09:42.8165335Z Brand build pipeline — /workspace/brad/brand-guidelines/brand.yml
2026-02-27T07:09:42.8166317Z   ⚠  No MCP_TOKEN — skipping swatch generation
2026-02-27T07:09:42.8669678Z   ✓  exports (4 files)
2026-02-27T07:09:43.0266301Z fatal: pathspec 'assets/swatches/' did not match any files
2026-02-27T07:09:43.0384758Z ⚙️ [runner]: exitcode '128': failure

Recommendation

Fix: Update build.yml to handle missing swatches directory

The workflow should use git add --ignore-errors to silently skip non-existent paths:

- name: Commit generated files if changed
  run: |
    git config user.name "Forgejo Actions"
    git config user.email "actions@git.brads.house"
    git remote set-url origin "https://ci:${{ github.token }}@git.brads.house/${{ github.repository }}.git"
    git add --ignore-errors brand.json brand.css BRAND.md assets/swatches/ assets/exports/
    if git diff --cached --quiet; then
      echo "No changes to commit"
    else
      git commit -m "chore: regenerate brand outputs from brand.yml"
      git push
    fi

This allows the workflow to succeed when swatches are not generated (no MCP_TOKEN).

Alternative: Add MCP_TOKEN to repo secrets

If swatch generation is desired, add the MCP_TOKEN secret to the repository settings.


Agent: @agent can fix by applying the --ignore-errors flag to git add in .forgejo/workflows/build.yml.


Update 2026-02-27 07:13 UTC

Fix attempted but failed due to permissions:

The CI user (ci@brads.house) lacks write permissions to this repository. Push was rejected:

Action required: Grant write permissions to the ci user for this repository via:

  • Forgejo UI: Settings → Collaborators → Add collaborator "ci"
  • Then apply the fix in commit a4cc206 or re-run the workflow

Fix content (for manual application):

## CI Failure Report **Workflow:** Build brand outputs **Commit:** c4f518ee31d7a3a8c9ae3fa83d9027be020eeaf3 **Run:** https://git.brads.house/brad/brand-guidelines/actions/runs/4 ## Triage Analysis ### Root Cause The workflow fails at the git commit step with: ``` fatal: pathspec 'assets/swatches/' did not match any files ⚙️ [runner]: exitcode '128': failure ``` ### What Happened 1. Build pipeline runs successfully and generates brand.json, brand.css, BRAND.md, and exports 2. No `MCP_TOKEN` is configured in the repo, so swatch generation is skipped (warning: `⚠ No MCP_TOKEN — skipping swatch generation`) 3. The `assets/swatches/` directory is never created or is empty 4. The workflow tries to run `git add assets/swatches/` which fails because the path does not exist ### Log Excerpt ``` 2026-02-27T07:09:42.8165335Z Brand build pipeline — /workspace/brad/brand-guidelines/brand.yml 2026-02-27T07:09:42.8166317Z ⚠ No MCP_TOKEN — skipping swatch generation 2026-02-27T07:09:42.8669678Z ✓ exports (4 files) 2026-02-27T07:09:43.0266301Z fatal: pathspec 'assets/swatches/' did not match any files 2026-02-27T07:09:43.0384758Z ⚙️ [runner]: exitcode '128': failure ``` ## Recommendation ### Fix: Update build.yml to handle missing swatches directory The workflow should use `git add --ignore-errors` to silently skip non-existent paths: ```yaml - name: Commit generated files if changed run: | git config user.name "Forgejo Actions" git config user.email "actions@git.brads.house" git remote set-url origin "https://ci:${{ github.token }}@git.brads.house/${{ github.repository }}.git" git add --ignore-errors brand.json brand.css BRAND.md assets/swatches/ assets/exports/ if git diff --cached --quiet; then echo "No changes to commit" else git commit -m "chore: regenerate brand outputs from brand.yml" git push fi ``` This allows the workflow to succeed when swatches are not generated (no MCP_TOKEN). ### Alternative: Add MCP_TOKEN to repo secrets If swatch generation is desired, add the `MCP_TOKEN` secret to the repository settings. --- **Agent:** @agent can fix by applying the `--ignore-errors` flag to git add in `.forgejo/workflows/build.yml`. --- ## Update 2026-02-27 07:13 UTC **Fix attempted but failed due to permissions:** The CI user (ci@brads.house) lacks write permissions to this repository. Push was rejected: **Action required:** Grant write permissions to the `ci` user for this repository via: - Forgejo UI: Settings → Collaborators → Add collaborator "ci" - Then apply the fix in commit `a4cc206` or re-run the workflow **Fix content (for manual application):**
Author

Update 2026-02-27 07:13 UTC

Fix attempted but failed due to permissions:

The CI user (ci@brads.house) lacks write permissions to this repository. Push was rejected with:

remote: Forgejo: User permission denied for writing.
! [remote rejected] main -> main (pre-receive hook declined)

Action required:

  1. Grant write permissions to the ci user for this repository via Forgejo UI (Settings - Collaborators - Add collaborator ci)
  2. Apply the fix: change git add to git add --ignore-errors in .forgejo/workflows/build.yml

@brad Please grant write permissions so the CI user can apply this fix.

## Update 2026-02-27 07:13 UTC **Fix attempted but failed due to permissions:** The CI user (ci@brads.house) lacks write permissions to this repository. Push was rejected with: ``` remote: Forgejo: User permission denied for writing. ! [remote rejected] main -> main (pre-receive hook declined) ``` **Action required:** 1. Grant write permissions to the ci user for this repository via Forgejo UI (Settings - Collaborators - Add collaborator ci) 2. Apply the fix: change git add to git add --ignore-errors in .forgejo/workflows/build.yml @brad Please grant write permissions so the CI user can apply this fix.
Collaborator

Fixed in PR #8 — added --ignore-errors flag to git add command. The workflow will now gracefully handle missing assets/swatches/ directory when MCP_TOKEN is not configured.

Fixed in PR #8 — added `--ignore-errors` flag to git add command. The workflow will now gracefully handle missing `assets/swatches/` directory when MCP_TOKEN is not configured.
Collaborator

Fix ready in PR #8. The workflow now uses git add --ignore-errors to handle missing swatches directory when MCP_TOKEN is not configured. The PR can be merged to resolve this issue.

Fix ready in PR #8. The workflow now uses `git add --ignore-errors` to handle missing swatches directory when MCP_TOKEN is not configured. The PR can be merged to resolve this issue.
agent closed this issue 2026-02-26 23:19:06 -08:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
brad/brand-guidelines#7
No description provided.