-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (36 loc) · 1.24 KB
/
sync.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Synchronise organization settings
on:
push:
branches:
- main
pull_request:
# Synchronise once per day
schedule:
- cron: "25 3 * * *"
jobs:
sync-settings:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install github-org-manager
run: pip install github-org-manager
- 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
# 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 }}