Skip to content

Commit

Permalink
Add the peripolos reference link
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Wang <[email protected]>
  • Loading branch information
huiwangredhat committed Oct 16, 2024
1 parent 357ab80 commit 4291b64
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/apply_peribolos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ jobs:
run: cp peribolos.yaml /tmp

- name: Checkout ghproxy and peribolos code
if: ${{ github.repository_owner == 'complytime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
#if: ${{ github.repository_owner == 'complytime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: actions/checkout@v4
with:
repository: kubernetes-sigs/prow

- name: Build ghproxy
if: ${{ github.repository_owner == 'complytime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
#if: ${{ github.repository_owner == 'complytime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
cd cmd/ghproxy
go mod tidy
go build -o ghproxy .
cp ghproxy /tmp
- name: Build peribolos
if: ${{ github.repository_owner == 'complytime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
#if: ${{ github.repository_owner == 'complytime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
cd cmd/peribolos
go mod tidy
Expand All @@ -47,18 +47,19 @@ jobs:
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: complytime

- name: Apply peribolos.yaml
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
if: ${{ github.repository_owner == 'complytime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
#if: ${{ github.repository_owner == 'complytime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
echo $GITHUB_TOKEN > auth.txt
/tmp/ghproxy --legacy-disable-disk-cache-partitions-by-auth-header=false --get-throttling-time-ms=300 --throttling-time-ms=900 --throttling-time-v4-ms=850 --throttling-max-delay-duration-seconds=45 --throttling-max-delay-duration-v4-seconds=110 --request-timeout=120 1>/dev/null 2>&1 &
pid=$!
jobs
/tmp/peribolos -config-path /tmp/peribolos.yaml --fix-org --fix-org-members --fix-repos -min-admins 2 --github-token-path /tmp/org-token 2>&1 | jq -r '[.severity, .time, .msg] | join(" | ")'
/tmp/peribolos -config-path /tmp/peribolos.yaml --fix-org --fix-org-members --fix-repos -min-admins 2 --github-token-path auth.txt 2>&1 | jq -r '[.severity, .time, .msg] | join(" | ")'
kill $pid
rm auth.txt
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
This repository will apply peribolos to manage orgnization complytime.

#References
[Peripolos CLI](https://docs.prow.k8s.io/docs/components/cli-tools/peribolos/)
[Peripolos source](https://github.com/kubernetes-sigs/prow/tree/main/cmd/peribolos)
4 changes: 2 additions & 2 deletions peribolos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ orgs:
has_repository_projects: true
members_can_create_repositories: true
admins:
- beatrizmcouto
- jpower432
- jflowers
- huiwangredhat
members:
- beatrizmcouto
- d10n
- gvauter
- hbraswelrh
- huiwangredhat
repos:
".github":
default_branch: main
Expand Down

0 comments on commit 4291b64

Please sign in to comment.