Added more documentation sections.

This commit is contained in:
Patrick Lehmann
2022-10-30 18:14:36 +01:00
parent 8d21ca154d
commit d7ad8f1387
6 changed files with 233 additions and 52 deletions

View File

@@ -1,7 +1,25 @@
Package
#######
generate source and wheel packages, and upload them as an artifact.
This job packages the Python source code as a source package (``*.tar.gz``) and wheel package (``*.whl``) and uploads it
as an artifact.
**Behavior:**
1. Checkout repository
2. Setup Python and install dependencies
3. Package Python sources:
* If parameter ``requirements`` is empty, use ``build`` package and run ``python build``.
* If parameter ``requirements`` is ``no-isolation``, use ``build`` package in *no-isolation* mode and run
``python build``.
* If parameter ``requirements`` is non-empty, use ``setuptools`` package and run ``python setup.py``.
**Dependencies:**
* actions/checkout@v2
* actions/setup-python@v2
* actions/upload-artifact@v2
Instantiation
*************
@@ -11,31 +29,73 @@ Simple Example
.. code-block:: yaml
TBD
jobs:
Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@r0
with:
artifact: Package
Complex Example
===============
.. code-block:: yaml
TBD
jobs:
Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@r0
needs:
- Params
- Coverage
with:
python_version: ${{ fromJson(needs.Params.outputs.params).python_version }}
requirements: -r build/requirements.txt
artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.Package }}
Template Parameters
*******************
TBD 1
=====
Parameters
**********
TBD
python_version
==============
TBD 1
=====
Python version.
TBD
+----------+----------+----------+
| Required | Type | Default |
+==========+==========+==========+
| optional | string | 3.11 |
+----------+----------+----------+
Template Results
****************
requirements
============
*None*
Python dependencies to be installed through pip; if empty, use pyproject.toml through build.
+----------+----------+----------+
| Required | Type | Default |
+==========+==========+==========+
| optional | string | ``""`` |
+----------+----------+----------+
artifact
========
Name of the package artifact.
+----------+----------+----------+
| Required | Type | Default |
+==========+==========+==========+
| yes | string | — — — — |
+----------+----------+----------+
Secrets
*******
This job template needs no secrets.
Results
*******
This job template has no output parameters.