diff --git a/share/gitea-tekton-org/tekton.dev_v1_Task_auto-ci-create.yaml b/share/gitea-tekton-org/tekton.dev_v1_Task_auto-ci-create.yaml index 1ec3a27..eb1c87d 100644 --- a/share/gitea-tekton-org/tekton.dev_v1_Task_auto-ci-create.yaml +++ b/share/gitea-tekton-org/tekton.dev_v1_Task_auto-ci-create.yaml @@ -43,7 +43,7 @@ spec: - name: DEPLOY_URL value: $(params.deploy-url) script: |- - #!/usr/bin/env ash + #!/usr/bin/env bash git clone "$(params.deploy-url)" --depth 1 . mkdir -p "projects/$(params.project-name)" bases/project bases/install bases/deploy added=0 @@ -78,6 +78,10 @@ spec: copy deploy-kusto.yaml bases/deploy/kustomization.yaml template deploy-repo.yaml.tmpl bases/deploy/repo.yaml template project-kusto.yaml.tmpl "projects/$(params.project-name)/kustomization.yaml" + if [ $added -ne 0 ];then + git commit -am "Adding $(params.project-name)" + git push + fi volumeMounts: - mountPath: /etc/templates name: templates