From 4291b648fe00fc5d572c4927ec88cfb438ff334f Mon Sep 17 00:00:00 2001 From: Sophia Wang Date: Mon, 14 Oct 2024 17:14:56 +0800 Subject: [PATCH] Add the peripolos reference link Signed-off-by: Sophia Wang --- .github/workflows/apply_peribolos.yml | 13 +++++++------ README.md | 4 ++++ peribolos.yaml | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/apply_peribolos.yml b/.github/workflows/apply_peribolos.yml index 67dab44..2a129c8 100644 --- a/.github/workflows/apply_peribolos.yml +++ b/.github/workflows/apply_peribolos.yml @@ -21,13 +21,13 @@ 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 @@ -35,7 +35,7 @@ jobs: 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 @@ -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 diff --git a/README.md b/README.md index 0d2ad20..aa0845d 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/peribolos.yaml b/peribolos.yaml index 903c27b..09ab129 100644 --- a/peribolos.yaml +++ b/peribolos.yaml @@ -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