add shivam200446 #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify and Apply Peribolos | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
project: | |
name: Apply peribolos.yaml to the org | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: Checkout ortelius/.github repo | |
uses: actions/checkout@v3 | |
with: | |
path: src/github.com/emporous/.github | |
- name: Build the peribolos.yaml syntax checker | |
run: | | |
go mod tidy | |
go mod vendor | |
working-directory: src/github.com/emporous/.github | |
- name: Checking peribolos.yaml syntax | |
run: | | |
go test ./... --config ../peribolos.yaml --owners-dir ../ | |
cp peribolos.yaml /tmp | |
working-directory: src/github.com/emporous/.github | |
- name: Checkout ghproxy and peribolos code | |
if: ${{ github.repository_owner == 'ortelius' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: actions/checkout@v3 | |
with: | |
repository: kubernetes/test-infra | |
- name: Build ghproxy | |
if: ${{ github.repository_owner == 'ortelius' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
run: | | |
cd ghproxy | |
go mod tidy | |
go build -o ghproxy . | |
cp ghproxy /tmp | |
- name: Build peribolos | |
if: ${{ github.repository_owner == 'ortelius' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
run: | | |
cd prow/cmd/peribolos | |
go mod tidy | |
go build -o peribolos . | |
cp peribolos /tmp | |
- name: Apply peribolos.yaml | |
if: ${{ github.repository_owner == 'ortelius' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
run: | | |
echo ${{ secrets.HELM_INDEXER_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-teams --fix-team-members --github-token-path auth.txt --github-endpoint http://localhost:8888 --confirm 2>&1 | jq -r '[.severity, .time, .msg] | join(" | ")' | |
kill $pid | |
rm auth.txt |