From 537136903c8c8a165effdb07f89c68d1baf085c0 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 11:37:23 +0000 Subject: [PATCH] Add Devin Playbook Sync workflow - Automatically syncs markdown files from playbooks/ directory to Devin - Triggers on push to main when .md files in playbooks/ change - Supports manual workflow dispatch with sync and list operations - Uses samfert-codeium/DEVIN-GITHUB-ACTIONS action - Outputs playbook IDs and sync count for verification Note: Requires DEVIN_API_KEY secret to be configured in repository settings Co-Authored-By: Sam Fertig --- .github/workflows/sync-playbooks.yml | 62 ++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/sync-playbooks.yml diff --git a/.github/workflows/sync-playbooks.yml b/.github/workflows/sync-playbooks.yml new file mode 100644 index 0000000..9f83b3c --- /dev/null +++ b/.github/workflows/sync-playbooks.yml @@ -0,0 +1,62 @@ +name: Sync Playbooks to Devin + +on: + push: + branches: [main] + paths: + - 'playbooks/**/*.md' + workflow_dispatch: + inputs: + operation: + description: 'Operation to perform' + required: false + type: choice + options: + - sync + - list + default: 'sync' + +jobs: + sync-playbooks: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Sync playbooks to Devin + id: sync + uses: samfert-codeium/DEVIN-GITHUB-ACTIONS@devin/1762305531-playbook-sync-action + with: + devin-api-key: ${{ secrets.DEVIN_API_KEY }} + operation: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.operation || 'sync' }} + directory: './playbooks' + recursive: 'true' + + - name: Output sync results + if: github.event.inputs.operation == 'sync' || github.event_name == 'push' + run: | + echo "==========================================" + echo "Playbooks Synced to Devin Successfully" + echo "==========================================" + echo "" + echo "Playbook IDs: ${{ steps.sync.outputs.playbook-ids }}" + echo "Playbooks synced: ${{ steps.sync.outputs.playbooks-count }}" + echo "" + if [ -n "${{ steps.sync.outputs.playbook-ids }}" ]; then + echo "✓ Created/updated ${{ steps.sync.outputs.playbooks-count }} playbook(s)" + else + echo "⚠ No playbooks were created (playbooks/ directory may be empty)" + fi + + - name: Output list results + if: github.event.inputs.operation == 'list' + run: | + echo "==========================================" + echo "Devin Playbooks List" + echo "==========================================" + echo "" + echo "Total playbooks: ${{ steps.sync.outputs.playbooks-count }}" + echo "" + echo "Details:" + echo '${{ steps.sync.outputs.operation-result }}' | jq '.'