name: Test and Publish Templates on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test-and-publish: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history for change detection - name: Install dependencies run: | # Install dropshell curl -fsSL https://getbin.xyz/dropshell-install | bash ~/.local/bin/dropshell create-config ~/.local/bin/dropshell install # Install jq for JSON parsing which jq || sudo apt-get update && sudo apt-get install -y jq # Install tar for packaging which tar || sudo apt-get update && sudo apt-get install -y tar - name: Run tests run: | chmod +x test.sh ./test.sh - name: Publish changed templates run: | SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} ~/.local/bin/dropshell publish --all ./