commit 859da82a4c3e0fbc6b562210dc081662eb7df90f Author: Charles No Date: Thu Aug 29 15:25:03 2024 -0400 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..23e7aac --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tasks/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0ef9f78 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Charles + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b7f0ee1 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# NanoCI + +This is a small CI written in PHP, but can produce anything. + +## Quickstart + +Start off by making an environment variable AUTH_KEY. + +Now, create a folder named `tasks/.task`. + +Then, make a file in it called `TASK`, and executable. + +This is a template: + +```bash +#!/bin/bash +cd $(dirname ${BASH_SOURCE[0]}) +rm -vfr artifacts +mkdir -p artifacts +``` + +Just place your stuff in `artifacts` when done. + +Now, you can add a webhook which is `http:///task.php?task=TASKNAME&authkey=CHANGEME`. + diff --git a/index.php b/index.php new file mode 100644 index 0000000..6ca94ae --- /dev/null +++ b/index.php @@ -0,0 +1,22 @@ + + +NanoCI + + +

NanoCI

+

Task list. Click to view logs, artifacts, and the task code.

+ + + diff --git a/task.php b/task.php new file mode 100644 index 0000000..70237ff --- /dev/null +++ b/task.php @@ -0,0 +1,24 @@ + $escapedLogPath &"); +?> diff --git a/viewtask.php b/viewtask.php new file mode 100644 index 0000000..00e5afa --- /dev/null +++ b/viewtask.php @@ -0,0 +1,49 @@ + + +View task + + +

View task

+ +

">View logfile

+

">View code

+

Artifacts

+ + +