### Configure GitHub Action for Standard Push to Soft Serve Source: https://context7.com/charmbracelet/soft-serve-action/llms.txt This configuration shows a standard synchronization workflow where branches and tags are pushed to a Soft Serve server, but deleted references are pruned without creating a full mirror. It uses 'actions/checkout' to get the code and 'charmbracelet/soft-serve-action' with 'mirror: false'. ```yaml name: Push to Self-Hosted Git on: push: branches: - master jobs: push-soft-serve: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 with: fetch-depth: 0 - name: Push to Soft Serve uses: charmbracelet/soft-serve-action@master with: server: soft-serve.internal.net ssh-key: ${{ secrets.SOFT_SERVE_KEY }} ssh-user: git ssh-port: 22 name: production-repo mirror: false ``` -------------------------------- ### Configure GitHub Action for Unauthenticated Soft Serve Sync Source: https://context7.com/charmbracelet/soft-serve-action/llms.txt This example demonstrates synchronizing a repository to a Soft Serve instance that does not require SSH key authentication. The 'ssh-key' parameter is omitted, and the action connects using only the 'server', 'ssh-user', and 'ssh-port'. ```yaml name: Public Soft Serve Sync on: push: branches: - main jobs: sync-public: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 with: fetch-depth: 0 - name: Push to public Soft Serve uses: charmbracelet/soft-serve-action@master with: server: public-git.example.com ssh-user: git ssh-port: 22 # No ssh-key required for unauthenticated servers ``` -------------------------------- ### Configure GitHub Action for Mirroring to Soft Serve Source: https://context7.com/charmbracelet/soft-serve-action/llms.txt This YAML configuration demonstrates how to set up a GitHub Action to create a complete mirror of a repository on a Soft Serve server. It requires fetching the full repository history and then uses the 'charmbracelet/soft-serve-action' with the 'mirror: true' option. The 'name' parameter is optional and defaults to the repository name. ```yaml name: Mirror Repository on: push: workflow_dispatch: jobs: mirror: runs-on: ubuntu-latest steps: - name: Checkout with full history uses: actions/checkout@v2 with: fetch-depth: 0 - name: Mirror to Soft Serve uses: charmbracelet/soft-serve-action@master with: server: backup.example.org ssh-key: ${{ secrets.SOFT_SERVE_KEY }} ssh-user: git ssh-port: 2222 mirror: true # name defaults to repository name if not specified ``` -------------------------------- ### Synchronize Multiple Branches to Soft Serve using GitHub Actions Source: https://context7.com/charmbracelet/soft-serve-action/llms.txt Set up the soft-serve-action to synchronize multiple branches (e.g., main, staging, development) and trigger on various GitHub events like pushes or releases. This ensures comprehensive repository management across different development stages. Requires server details and SSH credentials. ```yaml name: Multi-Branch Sync on: push: branches: - main - staging - development release: types: [published] workflow_dispatch: jobs: sync-all: runs-on: ubuntu-latest steps: - name: Checkout all branches uses: actions/checkout@v2 with: fetch-depth: 0 ref: ${{ github.ref }} - name: Sync to Soft Serve uses: charmbracelet/soft-serve-action@master with: server: git.example.com ssh-key: ${{ secrets.SOFT_SERVE_KEY }} ssh-user: git ssh-port: 22 mirror: false # Syncs the branch that triggered the workflow ``` -------------------------------- ### Configure GitHub Action for Soft Serve Synchronization Source: https://context7.com/charmbracelet/soft-serve-action/llms.txt This configuration sets up a GitHub Action to synchronize a repository with a Soft Serve server. It specifies the server details, SSH credentials, and synchronization mode (push or mirror). The action uses 'actions/checkout' to fetch repository code and 'charmbracelet/soft-serve-action' to perform the synchronization. ```yaml name: Sync to Soft Serve on: push: branches: - main - develop jobs: sync: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 with: fetch-depth: 0 # Full history required for mirroring - name: Push to Soft Serve uses: charmbracelet/soft-serve-action@master with: server: git.mycompany.com ssh-key: ${{ secrets.SOFT_SERVE_SSH_KEY }} ssh-user: git ssh-port: 22 name: my-project mirror: false ``` -------------------------------- ### GitHub Actions Workflow for Soft Serve Synchronization Source: https://github.com/charmbracelet/soft-serve-action/blob/master/README.md This YAML workflow configures a GitHub Actions job to synchronize a repository to a Soft Serve server. It checks out the code, then uses the 'charmbracelet/soft-serve-action' to push changes to the specified Soft Serve instance. It requires configuration for the Soft Serve server address, optionally a repository name, SSH credentials, user, port, and mirroring behavior. ```yaml name: Soft-Serve on: push: branches: - master jobs: soft-serve: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 with: fetch-depth: 0 # git cannot push a shallow clone - name: Push to Soft Serve uses: charmbracelet/soft-serve-action@master with: # Repository name on Soft Serve (defaults to GitHub repository name) name: foobar # The server hosting Soft Serve server: my.yummy.server.srv # Required only if Soft Serve is configured with authentication ssh-key: ${{ secrets.SOFT_SERVE_KEY }} # SSH user name, defaults to: git ssh-user: abc # Port on which the SSH server is running, defaults to: 22 ssh-port: 23231 # Whether or not to use git mirror to mirror the repository mirror: true ``` -------------------------------- ### Customize Soft Serve Repository Name with GitHub Actions Source: https://context7.com/charmbracelet/soft-serve-action/llms.txt Configure the soft-serve-action to push a GitHub repository to a Soft Serve server with a custom name. This is useful for maintaining different naming conventions or organizing repositories on the Soft Serve instance. Requires the server address, SSH key, user, and port. ```yaml name: Sync with Custom Name on: push: branches: - main jobs: sync: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 - name: Push to Soft Serve with custom name uses: charmbracelet/soft-serve-action@master with: server: git.company.local ssh-key: ${{ secrets.SOFT_SERVE_KEY }} ssh-user: admin ssh-port: 2222 name: company-project-v2 # GitHub repo name: myorg/old-project-name # Soft Serve repo name: company-project-v2 mirror: false ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.