Create deploy-wokflow.yml #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync Repository to Public Mirror | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - '**' | |
| - '*' | |
| push: | |
| branches: | |
| - '*' # Match any branch without slashes | |
| - '**' # Match any branch with slashes | |
| workflow_dispatch: | |
| inputs: | |
| force_sync: | |
| description: 'Force sync all branches' | |
| required: false | |
| default: 'true' | |
| type: boolean | |
| public_repo_name: | |
| description: 'Public repository name (leave empty to auto-derive by removing "-private")' | |
| required: false | |
| type: string | |
| jobs: | |
| call-sync-workflow: | |
| # Run for merged PRs, direct pushes, or manual triggers | |
| if: (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
| uses: thoughtspot/workflows/.github/workflows/sync-to-public-mirror.yml@5e34672e14727605657a131a08657fef8bb5ec48 | |
| with: | |
| force_sync: ${{ github.event.inputs.force_sync == 'true' }} | |
| public_repo_name: ${{ github.event.inputs.public_repo_name || '' }} | |
| secrets: | |
| SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} |