Skip to content

Conversation

@JesperTerkelsen
Copy link
Member

Summary

Replace the chmod permissions fix with sudo removal of manifests directory to resolve cleanup errors.

Problem

PR #224 added a chmod step to fix permissions, but it didn't work:

chmod: changing permissions of './manifests/.git/...': Operation not permitted

The git-rebase-push-action runs in a container with a different user, creating files that the GitHub Actions runner cannot modify or delete.

Solution

Instead of trying to fix permissions, simply remove the entire manifests directory with sudo rm -rf after we extract the commit SHA. We don't need the directory after that point anyway.

Changes

.github/workflows/component-deploy.yml:

  • Added "Remove manifests directory" step after getting manifest SHA
  • Uses sudo rm -rf ./manifests to bypass permission issues
  • Removed the ineffective "Fix manifest directory permissions" step

Benefits

  • Eliminates all cleanup permission errors
  • Simpler approach than trying to fix permissions
  • No impact on functionality since manifests directory isn't needed after SHA extraction

🤖 Generated with Claude Code

The previous chmod approach didn't work because the git-rebase-push-action
creates files owned by a different user (container user), resulting in
"Operation not permitted" errors.

Instead, remove the entire manifests directory with sudo after getting the
commit SHA, since we don't need it anymore. This avoids all cleanup issues.

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