CI Failure: fix: use FORGEJO_TOKEN for CI git auth #5

Closed
opened 2026-03-02 13:09:29 -08:00 by ci · 2 comments
Owner

CI Failure: Build Workflow Failed on Main

Run URL: https://git.brads.house/commune/brand/actions/runs/4
Commit: 207c0cb33a
Workflow: Build brand outputs (build.yml)
Branch: main
Attempts: 3/3

Error Summary

The workflow failed when trying to commit generated files:

fatal: pathspec 'assets/swatches/' did not match any files

Root Cause Analysis

The workflow (build.yml) attempts to add assets/swatches/ to git:

git add brand.json BRAND.md assets/swatches/ assets/exports/

However, when MCP_TOKEN is not configured (as is the case for this repo), the build script skips swatch generation:

No MCP_TOKEN - skipping swatch generation

The assets/swatches/ directory is never created, so git add assets/swatches/ fails with exit code 128, causing the entire workflow to fail.

What Succeeded

  • Brand validation passed
  • brand.json, brand.css, exports generated
  • BRAND.md generated
  • All brand outputs created successfully

Resolution Required

Update .forgejo/workflows/build.yml to conditionally add directories that exist:

- 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:${{ secrets.FORGEJO_TOKEN }}@git.brads.house/${{ github.repository }}.git"
    git add brand.json BRAND.md assets/exports/
    [ -d assets/swatches ] && git add assets/swatches/
    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 pattern ensures git add only attempts to add directories that actually exist.

Severity

LOW - Simple workflow fix, no changes needed to brand configuration or secrets. The fix addresses a missing conditional check for optional swatch generation.

# CI Failure: Build Workflow Failed on Main **Run URL:** https://git.brads.house/commune/brand/actions/runs/4 **Commit:** 207c0cb33ac702a19462abf553a550cd0ca5c259 **Workflow:** Build brand outputs (build.yml) **Branch:** main **Attempts:** 3/3 ## Error Summary The workflow failed when trying to commit generated files: ``` fatal: pathspec 'assets/swatches/' did not match any files ``` ## Root Cause Analysis The workflow (build.yml) attempts to add assets/swatches/ to git: ```yaml git add brand.json BRAND.md assets/swatches/ assets/exports/ ``` However, when MCP_TOKEN is not configured (as is the case for this repo), the build script skips swatch generation: ``` No MCP_TOKEN - skipping swatch generation ``` The assets/swatches/ directory is never created, so `git add assets/swatches/` fails with exit code 128, causing the entire workflow to fail. ## What Succeeded - Brand validation passed - brand.json, brand.css, exports generated - BRAND.md generated - All brand outputs created successfully ## Resolution Required Update .forgejo/workflows/build.yml to conditionally add directories that exist: ```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:${{ secrets.FORGEJO_TOKEN }}@git.brads.house/${{ github.repository }}.git" git add brand.json BRAND.md assets/exports/ [ -d assets/swatches ] && git add assets/swatches/ 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 pattern ensures `git add` only attempts to add directories that actually exist. ## Severity LOW - Simple workflow fix, no changes needed to brand configuration or secrets. The fix addresses a missing conditional check for optional swatch generation.
Author
Owner

Update: A fix commit (59ced3f) 'fix: handle missing assets/swatches/ in CI commit step' has been pushed and is currently running in run #5. The fix conditionally adds the swatches directory only if it exists.

**Update:** A fix commit (59ced3f) 'fix: handle missing assets/swatches/ in CI commit step' has been pushed and is currently running in [run #5](https://git.brads.house/commune/brand/actions/runs/5). The fix conditionally adds the swatches directory only if it exists.
Owner

fixing upstream

fixing upstream
brad closed this issue 2026-03-02 13:16:18 -08:00
Sign in to join this conversation.
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
commune/brand#5
No description provided.