Skip to content

Conversation

@JesperTerkelsen
Copy link
Member

Summary

Fix workspace cleanup errors caused by git-rebase-push-action creating git objects with restricted permissions.

Problem

After merging PR #223 which added the git-rebase-push-action for handling concurrent deployments, we're seeing cleanup errors in service-admin-panel deployments:

[error]File was unable to be removed Error: EACCES: permission denied, unlink '/home/runner/work/service-admin-panel/service-admin-panel/manifests/.git/objects/0b/6c241129e8baceb4e10e4b60ef1d368531ef0a'

Example: https://github.com/monta-app/service-admin-panel/actions/runs/21147790411

The git-rebase-push-action creates git objects with restricted permissions that GitHub Actions cannot clean up during the post-job cleanup phase.

Solution

Add a cleanup step that runs chmod -R u+w ./manifests/.git before the final slack notification to ensure GitHub Actions can properly clean up the workspace.

Changes

.github/workflows/component-deploy.yml:

  • Added "Fix manifest directory permissions" step
  • Runs with if: always() to execute even on failure
  • Uses || true to avoid failing if directory doesn't exist

Testing

This should be tested with the next deployment to service-admin-panel to verify the cleanup errors are resolved.

🤖 Generated with Claude Code

The git-rebase-push-action creates git objects with restricted permissions
that prevent GitHub Actions from cleaning up the workspace. This adds a
step to fix permissions before job completion to avoid cleanup errors.

Related to issue in: https://github.com/monta-app/service-admin-panel/actions/runs/21147790411

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@JesperTerkelsen JesperTerkelsen merged commit 2f34273 into main Jan 19, 2026
1 check passed
@JesperTerkelsen JesperTerkelsen deleted the fix/manifests-cleanup-permissions branch January 19, 2026 18:38
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.

3 participants