initialize the CI/CD pipeline to sync to SVN (does not include the commit step yet) #1

Merged
agnav merged 5 commits from feature/ci-cd-pipeline into development 2026-04-22 20:07:41 +00:00
Showing only changes of commit cd8f954584 - Show all commits

View File

@ -8,7 +8,10 @@
# SVN_REPO_URL Base SVN repo URL (e.g. https://svn.example.com/repos/myproject) # SVN_REPO_URL Base SVN repo URL (e.g. https://svn.example.com/repos/myproject)
name: Sync to SVN name: Sync to SVN
on: [push] on:
push:
branches:
- master
jobs: jobs:
push-to-svn: push-to-svn:
@ -51,3 +54,24 @@ jobs:
--exclude='.svn/' \ --exclude='.svn/' \
--exclude='svn-branch/' \ --exclude='svn-branch/' \
. svn-branch/ . svn-branch/
- name: Stage and commit to SVN
run: |
cd svn-branch
# Add all new/unversioned files and directories in one pass
svn add --force .
# Delete files removed from git (handles paths with spaces).
# '|| true' prevents pipefail aborting when grep finds no '!' lines.
svn status | grep '^!' | while IFS= read -r line; do
svn delete "${line:8}@"
done || true
# Attempt commit; svn commit exits 0 silently when nothing changed
svn commit \
--username "${{ secrets.SVN_USERNAME }}" \
--password "${{ secrets.SVN_PASSWORD }}" \
--no-auth-cache \
--non-interactive \
--trust-server-cert \
-m "Gitea CI sync from commit ${{ github.sha }} [ci skip]"