Skip to content

tushar5526/sarthi-deploy

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sarthi Deploy action-badge cookiecutter-pyaction

Easy to set up Docker Compose based Ephemeral previews!

Pre-requisites 🛠️

  1. This action is meant to be used in parallel with a self-hosted Sarthi service.
  2. Get the secrets generate from that service and add it to the repository's secret. See creating-secrets-for-a-repository by GitHub.

Usage 🔄

name: Sarthi Preview Environments
on:
  # pull_request_target to support PRs from forks
  pull_request_target:
    types: [ opened, closed, reopened, synchronize ]
  push:
    branches:
      - master
      - main
  # delete preview environments when branches are deleted
  delete:

jobs:
  sarthi_job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Set up Sarthi
        uses: tushar5526/sarthi-deploy@main
        with:
          compose_file: docker-compose.yml # override this with the compose file location in your project
          sarthi_server_url: ${{ secrets.SARTHI_SERVER_URL }} # Sarthi API Backend URL prompted after running the installation script
          sarthi_secret: ${{ secrets.SARTHI_SECRET }} # Secret text generated while setting up the server
          gh_repo_rw_token: ${{ secrets.GH_REPO_RW_TOKEN }} # GitHub PAT token to allow cloning private repos. This is needed if you want to run Sarthi on private repos. 

License 📄

This action is licensed under some specific terms. Check here for more information.