]> ruderich.org/simon Gitweb - punyci/punyci.git/commitdiff
README: document post-commit mode
authorSimon Ruderich <simon@ruderich.org>
Thu, 26 Feb 2026 05:43:50 +0000 (06:43 +0100)
committerSimon Ruderich <simon@ruderich.org>
Thu, 26 Feb 2026 05:43:50 +0000 (06:43 +0100)
README.adoc

index 357c11cad12823c38d10a5df35df13c5708c4c0a..ee56ef01263ccd5c0836ec26064f46864c2339bc 100644 (file)
@@ -1,10 +1,11 @@
 = 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.
 
@@ -16,13 +17,15 @@ Compile `punyci` with `go build` or `make`.
 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
@@ -62,6 +65,26 @@ To run the CI in the foreground use `git push -o wait`. This needs the option
 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