11 Commits

Author SHA1 Message Date
bb4c82c8c6 Fix workflow for Gitea Actions compatibility
- Replace GITHUB_STEP_SUMMARY with simple echo logging for Gitea compatibility
- Remove GitHub-specific step summary features that don't work in Gitea Actions
- Convert Create summary step to Log results step with console output
- Maintain debug output and step communication for troubleshooting
- Ensure workflow is fully compatible with Gitea Actions environment
2025-08-11 13:38:02 +07:00
284d715aa3 Fix workflow summary step output debugging
All checks were successful
Auto-Sort Files / auto-sort (push) Successful in 6s
- Add debug output to show the value of files_moved from previous step
- Store step output in variable for better debugging and comparison
- Fix issue where Create summary step was always showing empty results
- Ensure proper step output communication between workflow steps
- Add debugging information to troubleshoot step output issues
2025-08-11 13:32:36 +07:00
ed728e7028 Update workflow to use [skip actions] flag for infinite loop prevention
- Remove conditional check based on commit message detection
- Use [skip actions] flag in commit message to prevent workflow recursion
- Simplify git configuration using inline -c flags instead of git config --local
- Combine commit and push steps for cleaner workflow execution
- Follow Gitea Actions best practices for preventing infinite loops
- Maintain all functionality while using standard skip actions approach
2025-08-11 13:10:26 +07:00
e8c01c8747 Prevent infinite workflow loops by skipping CI bot commits
- Add condition to skip workflow when triggered by Auto-sort commits
- Use github.event.head_commit.message to detect CI bot commits
- Prevent infinite loop where workflow push triggers another workflow run
- Only run workflow for user commits, not automated CI commits
- Maintains functionality while preventing recursive execution
2025-08-11 11:52:04 +07:00
eff0142a22 Fix git tracking issue in file movement
- Replace mv with git mv to preserve git file tracking
- Remove unnecessary git add step since git mv automatically stages changes
- Fix issue where moved files appeared as deleted in git status
- Ensure proper git history preservation when files are reorganized
- Files will now show as moved/renamed instead of deleted/added in git log
2025-08-11 11:36:49 +07:00
29b4ffe576 Add configurable worker credentials for git operations
- Replace hardcoded git user email and name with configurable variables
- Add WORKER_EMAIL and WORKER_USERNAME variables for git commits and authentication
- Update workflow to use vars.WORKER_EMAIL and vars.WORKER_USERNAME
- Use WORKER_USERNAME in push URL authentication instead of hardcoded 'ci-bot'
- Update GITEA-ACTIONS-SETUP.md with instructions for setting up repository variables
- Add variables to setup checklist for complete configuration
- Provide flexibility for different organizations and naming conventions
2025-08-11 11:31:59 +07:00
0e800242d7 Fix push URL construction in workflow
Some checks failed
Auto-Sort Files / auto-sort (push) Has been cancelled
- Correct URL parsing to properly extract domain and repository path
- Fix malformed push URL that was missing proper formatting
- Add debug logging to show URL components for troubleshooting
- Ensure proper HTTPS authentication URL format: https://user:token@domain/repo.git
- Handle both HTTPS and SSH repository URL formats correctly
- Fix issue where push was failing due to incorrect URL construction
2025-08-11 11:21:11 +07:00
004d8c00a6 Fix file detection issue in workflow
Some checks failed
Auto-Sort Files / auto-sort (push) Failing after 5s
- Replace process substitution with mapfile array approach for better compatibility
- Use mapfile -t to read find results into arrays
- Simplify file processing with standard for loops
- Fix issue where files weren't being detected properly
- Use function return codes to track file movement status
- Ensure FILES_MOVED flag is set correctly when files are actually moved
- More reliable file detection and processing across different bash versions
2025-08-11 11:18:57 +07:00
4371c0f201 Fix workflow file movement detection issue
All checks were successful
Auto-Sort Files / auto-sort (push) Successful in 5s
- Replace pipe-based while loop with process substitution to preserve variable scope
- Use temporary file to track FILES_MOVED status across subshells
- Fix issue where files were moved but commit/push steps were skipped
- Use find with -print0 and while read -d '' for proper handling of filenames with spaces
- Ensure FILES_MOVED flag is properly set when files are actually moved
- Now correctly triggers commit and push steps when files are reorganized
2025-08-11 11:16:49 +07:00
4c1813005e Improve Gitea Actions workflow with dynamic repository URL detection
- Update .gitea/workflows/auto-sort-files.yml to dynamically fetch repository URL using git config
- Support both HTTPS and SSH repository URL formats automatically
- Remove hardcoded repository URL for better portability across different repositories
- Add intelligent URL parsing to construct proper authenticated push URL
- Update GITEA-ACTIONS-SETUP.md to document dynamic URL detection feature
- Improve workflow flexibility for template reuse across different projects
2025-08-11 11:02:56 +07:00
e3b480ec33 Convert CI auto-sort system to Gitea Actions
- Move workflow from ci/auto-sort-files.yml to .gitea/workflows/auto-sort-files.yml
- Update workflow to use CI_BOT_TOKEN secret for Gitea authentication
- Configure proper git push URL for Gitea repository
- Update ci/README.md with comprehensive Gitea Actions setup instructions
- Add GITEA-ACTIONS-SETUP.md with detailed configuration guide
- Update README.md to reference Gitea Actions setup documentation
- Remove old GitHub Actions workflow file
- Provide step-by-step token creation and repository secret configuration
- Include troubleshooting guide and security considerations
2025-08-11 10:47:39 +07:00