Synchronise organization settings #852
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: Synchronise organization settings | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| # Synchronise once per day | |
| schedule: | |
| - cron: "25 3 * * *" | |
| jobs: | |
| sync-settings: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Set up Python | |
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 | |
| with: | |
| python-version: "3.14" | |
| - name: Install github-org-manager | |
| run: pip install -r requirements.txt | |
| - name: Display information about github-org-manager | |
| run: gh-org-mgr --version | |
| # Make a dry run in pull requests | |
| - name: Synchronise settings with github-org-manager (pull request, dry) | |
| if: github.event_name == 'pull_request' | |
| run: gh-org-mgr sync -c . --dry -v | |
| # Get app private key from secrets, set as environment variable | |
| env: | |
| GITHUB_APP_PRIVATE_KEY: ${{ secrets.GTHB_APP_PRIVATE_KEY }} | |
| # Only effectively sync on main branch | |
| - name: Synchronise settings with github-org-manager (main branch, prod) | |
| if: github.ref == 'refs/heads/main' | |
| run: gh-org-mgr sync -c . | |
| # Get app private key from secrets, set as environment variable | |
| env: | |
| GITHUB_APP_PRIVATE_KEY: ${{ secrets.GTHB_APP_PRIVATE_KEY }} |