Fork Sync #420
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: Fork Sync | |
| on: | |
| schedule: | |
| - cron: "0 */6 * * *" # every 6 hours | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| # Permissions here apply to the central repo only; pushing to other repos uses FORK_SYNC_TOKEN (a PAT). | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Install dependencies | |
| run: pip install PyGithub pyyaml | |
| - name: Run sync bot | |
| env: | |
| # REQUIRED: Org-level or repo secret. Classic PAT with "repo" + "read:org" scopes. Enable SSO if your org enforces it. | |
| FORK_SYNC_TOKEN: ${{ secrets.FORK_SYNC_TOKEN }} | |
| ORG_NAME: USD-AI-ResearchLab | |
| # OPTIONAL: set to "true" to open a PR if direct push to protected default branch is blocked | |
| FALLBACK_TO_PR: "true" | |
| run: python sync_bot.py |