A simple Go program to set commit status. It uses go-scm to support multiple Git providers(GitHub, GitLab, etc).
- Run it locally
$ go build -o gitops-commit-status .
$ ./gitops-commit-status --sha <commit_sha> --url <git_repo_url> --token <token> --status <commit_status> --context <commit_status>
- Tekton
Inlcude it as part of your Tekton pipeline and set the commit status based on PipelineRun status. An example task and taskrun can be found in tekton.
$ kubectl create secret generic git-host-access-token --from-literal=token=<token>
$ kubectl apply -f tekton/