Skip to content

Fix native-themes-sync commit-back: mark workspace safe.directory#5173

Merged
shai-almog merged 1 commit into
masterfrom
fix-native-themes-sync-safe-directory
Jun 5, 2026
Merged

Fix native-themes-sync commit-back: mark workspace safe.directory#5173
shai-almog merged 1 commit into
masterfrom
fix-native-themes-sync-safe-directory

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Follow-up to #5172. That PR's packages: read fix unblocked the container pull in Native Themes Sync, so the Commit and push regenerated .res files step ran for the first time ever — and immediately failed (exit 128):

fatal: not in a git directory

Root cause

The job runs inside the pr-ci-container. The checked-out tree is owned by a different UID than the user executing the run: shell step, so git's dubious-ownership guard rejects every command. actions/checkout does write a safe.directory entry, but into the action's HOME, which the raw bash step doesn't share — so the guard still fires in the commit step.

This step had never executed before: prior to #5172 the job always died earlier at the container pull, so this was latent from day one.

Fix

Add the workspace to safe.directory at the top of the commit step, before the git config/commit/push calls:

git config --global --add safe.directory "$GITHUB_WORKSPACE"

Effect

This PR touches native-themes-sync.yml, which is in the workflow's own trigger paths:, so merging it re-fires the sync. It should now run end-to-end and commit the regenerated Themes/*.res files (stale since #5170 changed the theme CSS but the sync never managed to commit). Self-healing once merged.

🤖 Generated with Claude Code

With the packages:read fix (#5172) the container pull now succeeds, so
the "Commit and push regenerated .res files" step ran for the first time
and failed with "fatal: not in a git directory" (exit 128).

The job runs inside the pr-ci-container, where the checked-out tree is
owned by a different UID than the shell step's user. git's dubious-
ownership guard then refuses every command. actions/checkout records a
safe.directory entry, but in the action's HOME, which the bash run step
doesn't share -- so add the workspace to safe.directory explicitly
before the git config/commit/push calls.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ByteCodeTranslator: 0 findings (no issues)
    • android: 0 findings (no issues)
    • codenameone-maven-plugin: 0 findings (no issues)
    • core-unittests: 0 findings (no issues)
    • ios: 0 findings (no issues)
  • PMD: 0 findings (no issues) [Report archive]
  • Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog shai-almog merged commit 0e99e31 into master Jun 5, 2026
12 checks passed
@shai-almog shai-almog deleted the fix-native-themes-sync-safe-directory branch June 5, 2026 11:04
shai-almog added a commit that referenced this pull request Jun 5, 2026
The Native Themes Sync workflow that normally regenerates and commits
these was broken (container-pull + safe.directory bugs, fixed in #5172
and #5173), so the committed Themes/{iOSModernTheme,AndroidMaterialTheme}.res
were never rebuilt after #5170 changed native-themes/ios-modern/theme.css
and native-themes/android-material/theme.css. Regenerated here manually
via scripts/build-native-themes.sh so master's .res match their CSS
sources again.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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