Skip to content

Commit fe9881d

Browse files
authored
Merge pull request #760 from cloudfoundry/github-org-automation
Run peribolos and branchprotector in separate jobs
2 parents 9d686a8 + 87044e9 commit fe9881d

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

.github/workflows/org-management.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'toc/working-groups/*.md'
1010
- '.github/workflows/org-management.yml'
1111
schedule:
12-
- cron: '0 */5 * * *'
12+
- cron: '0 */7 * * *'
1313

1414
jobs:
1515
peribolos:
@@ -73,6 +73,47 @@ jobs:
7373
--fix-team-members
7474
--fix-team-repos
7575
--allow-repo-archival
76+
branchprotector:
77+
needs: peribolos
78+
runs-on: ubuntu-latest
79+
concurrency:
80+
group: peribolos
81+
services:
82+
ghproxy:
83+
image: rkoster/ghproxy
84+
options: >-
85+
--mount type=bind,source=/etc/passwd,target=/etc/passwd,readonly
86+
--mount type=bind,source=/etc/group,target=/etc/group,readonly
87+
ports:
88+
- 8888:8888
89+
volumes:
90+
- ${{ github.workspace }}/ghproxy-cache:/cache
91+
steps:
92+
- name: ghproxy-cache
93+
uses: actions/cache@v3
94+
with:
95+
path: ${{ github.workspace }}/ghproxy-cache
96+
key: ghproxy-cache-${{ github.run_number }}
97+
restore-keys: |
98+
ghproxy-cache-
99+
- uses: actions/setup-python@v4
100+
with:
101+
python-version: 3.9
102+
- uses: actions/checkout@v3
103+
with:
104+
path: community
105+
- name: Generate github org configuration
106+
run: |
107+
python -m pip install --upgrade pip
108+
pip install -r community/org/requirements.txt
109+
python community/org/org_management.py -o cloudfoundry.out.yml -b branchprotection.out.yml
110+
- name: write github private key
111+
run: |
112+
echo "${GH_PRIVATE_KEY}" > private_key
113+
echo "${GH_TOKEN}" > token
114+
env:
115+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
116+
GH_PRIVATE_KEY: ${{ secrets.GH_PRIVATE_KEY }}
76117
- name: branchprotector
77118
id: branchprotector
78119
uses: docker://gcr.io/k8s-prow/branchprotector

0 commit comments

Comments
 (0)