A GitHub Action that provides the Subversion (SVN) command-line interface in CI/CD workflows by running a containerized SVN installation and exposing it to the runner PATH.
This action eliminates the need to install Subversion on every workflow run by leveraging a pre-built Docker container. The container runs as a background service, and a lightweight wrapper script forwards svn
commands to the containerized binary via docker exec
.
- Reduced build time: Avoids repeated
apt-get install
operations on every workflow run - Consistent environment: Uses a fixed Subversion version from a controlled container image
- Minimal overhead: Container images are cached by GitHub Actions infrastructure
- Drop-in replacement: Existing
svn
commands work without modification
Add the action to your workflow:
- name: Install SVN Binary
uses: codesnippetspro/svn-binary@v1
Use the default latest version:
- name: Install SVN Binary
uses: codesnippetspro/svn-binary@v1
- name: Run SVN commands
run: |
svn --version
svn checkout https://svn.example.com/repo/trunk
Pin to a specific version:
- name: Install SVN Binary
uses: codesnippetspro/svn-binary@v1
with:
version: v1.0.0
name: Deploy to SVN Repository
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install SVN Binary
uses: codesnippetspro/svn-binary@v1
with:
version: latest
- name: Deploy to SVN
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
run: |
svn checkout https://plugins.svn.example.org/my-plugin svn-repo
cp -r dist/* svn-repo/trunk/
cd svn-repo
svn add . --force
svn commit -m "Release ${{ github.ref_name }}" \
--username "$SVN_USERNAME" \
--password "$SVN_PASSWORD" \
--no-auth-cache \
--non-interactive
Input | Description | Required | Default |
---|---|---|---|
version |
Container image version tag (e.g., v1.0.0 , latest ) |
No | latest |
image |
Full container image path (overrides version-based image selection) | No | ghcr.io/{owner}/svn-binary:{version} |
container_name |
Container name prefix (unique suffix appended automatically) | No | svn-binary-svc |
This action does not produce outputs. After execution, the svn
command is available in the runner PATH for subsequent workflow steps.
- Docker must be available on the runner (pre-installed on GitHub-hosted
ubuntu-latest
runners) - Network access to GitHub Container Registry (ghcr.io) for image pulls
- Sufficient runner permissions to execute
docker run
anddocker exec
The action performs the following operations:
- Container Launch: Starts a detached Docker container running
sleep infinity
- Wrapper Creation: Generates a shell script at
$RUNNER_TEMP/svn-bin/svn
that forwards commands to the container viadocker exec
- PATH Modification: Appends the wrapper directory to
$GITHUB_PATH
for subsequent steps
The container uses a unique name based on the GitHub run ID to prevent conflicts in concurrent workflows.
- Docker dependency: Requires Docker on the runner; not compatible with runners lacking Docker support
- Network overhead: First run or cache miss requires pulling the container image (typically 50-150 MB)
- Linux only: Designed for Linux runners; macOS and Windows support not tested
- Container lifecycle: The container runs for the duration of the workflow job; manual cleanup may be required if the job terminates abnormally
# Build the container image
docker build -t svn-binary:local .
# Test locally
docker run --rm svn-binary:local --version
# Install dependencies
npm install
# Build action
npm run build
# Run smoke tests
docker build -t svn-binary:test .
docker run --rm svn-binary:test --version
Contributions are welcome. Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/improvement
) - Commit changes with clear messages
- Submit a pull request with a description of changes
For bug reports and feature requests, please open an issue with detailed information.
This project is licensed under the MIT License. See LICENSE for details.
This action is maintained by Code Snippets Pro and is designed to support automated deployment workflows for WordPress plugins and other SVN-based repositories.