Skip to content

Commit

Permalink
feat: Handle push on .github repository
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Drla <mdrla@redhat.com>
  • Loading branch information
Michal Drla committed Apr 5, 2022
1 parent e87c4f9 commit b978d3e
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions pipelines/base/peribolos-run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: peribolos-run
spec:
params:
- name: REPO_NAME
type: string
default: '.github'
- name: INSTALLATION_ID
type: string
steps:
- name: apply-peribolos
image: quay.io/operate-first/opf-toolbox
env:
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: peribolos-$(params.INSTALLATION_ID)
key: token
- name: ORG_NAME
valueFrom:
secretKeyRef:
name: peribolos-$(params.INSTALLATION_ID)
key: orgName
script: |
#!/usr/bin/bash
echo "Cloning repository..."
# Clone repository
git clone https://github.com/$ORG_NAME/$(params.REPO_NAME)
cd $(params.REPO_NAME)
# Save token to file
echo $GITHUB_TOKEN > token
# Run Peribolos on the repository
echo "Running peribolos..."
peribolos --config-path github-config.yaml --github-token-path token --fix-org --fix-repos --fix-team-members --fix-teams --fix-team-repos --confirm

0 comments on commit b978d3e

Please sign in to comment.