Skip to content

Commit

Permalink
Initial .github repo
Browse files Browse the repository at this point in the history
  • Loading branch information
huiwangredhat committed Sep 30, 2024
0 parents commit 9cf7b97
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/apply_peribolos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Apply Peribolos
on:
push:
branches:
- main
pull_request:
jobs:
Apply-peribolos:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.23"

- name: Checkout complytime/.github repo
uses: actions/checkout@v4

- name: Copy peribolos.yaml
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' }}
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' }}
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' }}
run: |
cd cmd/peribolos
go mod tidy
go build -o .
cp peribolos /tmp
- name: Apply peribolos.yaml
if: ${{ github.repository_owner == 'complytime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
echo ${{ secrets.orgtoken }} > 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 --github-token-path /tmp/org-token --github-endpoint http://localhost:8888 --confirm 2>&1 | jq -r '[.severity, .time, .msg] | join(" | ")'
kill $pid
rm auth.txt
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This repository will apply peribolos to manage org complytime.
23 changes: 23 additions & 0 deletions peribolos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
orgs:
complytime:
description:
default_repository_permission: read
has_organization_projects: true
has_repository_projects: true
members_can_create_repositories: true
admins:
- jpower432
members:
- beatrizmcouto
- d10n
- gvauter
- hbraswelrh
- huiwangredhat
- jflowers
repos:
".github":
default_branch: main
description: demo
has_projects: true
docs:
description: Documentation

0 comments on commit 9cf7b97

Please sign in to comment.