Skip to content

Add the peripolos reference link #13

Add the peripolos reference link

Add the peripolos reference link #13

Workflow file for this run

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: Generate a app token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: complytime
repositories: complytime/.github
- 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' }}
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 auth.txt 2>&1 | jq -r '[.severity, .time, .msg] | join(" | ")'
kill $pid
rm auth.txt