Repository navigation
org-repo-changed #2252
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: Org metadata sync | |
| on: | |
| repository_dispatch: | |
| types: [org-repo-changed] | |
| workflow_dispatch: | |
| inputs: | |
| repository: | |
| description: Optional repository name or managed owner/repository | |
| required: false | |
| dry_run: | |
| description: Dry run (no writes) | |
| type: boolean | |
| default: false | |
| schedule: | |
| - cron: "17 */6 * * *" | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: org-metadata-sync-${{ github.repository_owner }} | |
| cancel-in-progress: false | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout org profile repo | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.ORG_SYNC_PAT }} | |
| - name: Configure git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| working-directory: org-sync | |
| run: pip install -r requirements.txt | |
| - name: Sync managed repository metadata | |
| working-directory: org-sync | |
| env: | |
| GH_TOKEN: ${{ secrets.ORG_SYNC_PAT }} | |
| GITHUB_ROOT: ${{ github.workspace }} | |
| ORG_DOTGITHUB_ROOT: ${{ github.workspace }} | |
| run: python run_event.py |