= README
punyci is a smaller than tiny continuous integration (CI) tool for Git and
-Podman. It runs as post-receive hook and executes the jobs with Podman in the
-background. If a job fails it sends a mail to the current user. The container
-is kept alive for an hour to debug issues "live" without needing multiple
-runs.
+Podman. It runs as post-receive or post-commit hook and executes the jobs with
+Podman in the background. If a job fails it sends a mail to the current user.
+The container is kept alive for an hour to debug issues "live" without needing
+multiple runs. To debug issues with punyci the job can also be run in the
+foreground.
punyci is free software and licensed under GPL version 3 or later.
Setup `podman` for an unprivileged user. To receive mails `/usr/bin/sendmail`
needs to be installed (provided by e.g. Postfix, nullmailer, etc.). Create a
bare Git repository and call `punyci post-receive` from the post-receive hook.
+Alternatively, setup a regular Git repository and call `punyci post-commit`
+from the post-commit hook.
punyci can run on the same host or on a remote host via SSH.
== Usage
-Example:
+Example (post-receive):
$ git init --bare repo.git
$ echo 'punyci post-receive' > repo.git/hooks/post-receive
the command will hang until the timeout. Simply press Ctrl-C or kill the
containers manually.
+Example (post-commit):
+
+ $ git init repo
+ $ echo 'punyci post-commit' > repo/.git/hooks/post-commit
+ $ chmod +x repo/.git/hooks/post-commit
+
+ $ cd repo
+ $ cat > .punyci.toml <<EOF
+ [[Jobs]]
+ Image = "debian:trixie"
+ Script = "exit 1"
+ EOF
+ $ git add .punyci.toml
+ $ git commit -m punyci
+ 2026/02/26 06:41:15 punyci: queued 1 jobs
+ [...]
+
+The behavior is the same as above. To run the CI in the foreground use
+`PUNYCI=wait git commit`.
+
== Configuration