-
Notifications
You must be signed in to change notification settings - Fork 47
41 lines (32 loc) · 1.46 KB
/
peribolos.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Peribolos
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 0 * * *"
env:
PERIBOLOS_ARGS: "--fix-org --fix-org-members --fix-repos --fix-teams --fix-team-members --fix-team-repos --allow-repo-publish --allow-repo-archival --github-allowed-burst=300 --github-hourly-tokens=1000"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Generating Peribolos configuration
run: cd tools && go run peribolosbuilder.go -config=../config > ../peribolos.yaml && cd ..
- name: Printing configuration for safety
run: cat peribolos.yaml
- name: Preparing credentials
run: echo ${{ secrets.PERIBOLOS_GH_TOKEN }} >> github-token # a secret with the user token to be used for execution
- name: Run Peribolos Configuration Verification
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: docker://ghcr.io/dynatrace-innovationlab/peribolos:v0
with:
args: ${{ env.PERIBOLOS_ARGS }} --github-token-path github-token --config-path peribolos.yaml
- name: Apply Peribolos Configuration
if: github.event_name != 'pull_request'
uses: docker://ghcr.io/dynatrace-innovationlab/peribolos:v0
with:
args: ${{ env.PERIBOLOS_ARGS }} --github-token-path github-token --config-path peribolos.yaml --confirm