Reworked more documentation sections.

This commit is contained in:
Patrick Lehmann
2022-11-06 21:30:33 +01:00
parent 2e15b32bad
commit 8bc6ca673c
9 changed files with 146 additions and 163 deletions

View File

@@ -48,30 +48,6 @@ Workflow). They can also serve as an example for creating or driving own job tem
Instantiation
*************
The job templates (GitHub Action *Reusable Workflows*) need to be stored in the same directory where normal pipelines
(GitHub Action *Workflows*) are located: ``.github/workflows/<template>.yml``. These template files are distinguished
from a normal pipeline by a ``on:workflow_call:`` section compared to an ``on:push`` section.
**Job Template Definition:**
The ``workflow_call`` allows the definition of input and output parameters.
.. code-block:: yaml
on:
workflow_call:
inputs:
<Param1>:
# ...
outputs:
# ...
jobs:
<JobName>:
# ...
**Job Template Instantiation:**
When instantiating a template, a ``jobs:<Name>:uses`` is used to refer to a template file. Unfortunately, besides the
GitHub SLUG (*<Organization>/<Repository>*), also the full path to the template needs to be gives, but still it can't be
outside of ``.github/workflows`` to create a cleaner repository structure. Finally, the path contains a branch name
@@ -89,9 +65,3 @@ to handover input parameters to the template.
uses: <GitHubOrganization>/<Repository>/.github/workflows/<Template>.yml@v0
with:
<Param1>: <Value>
Development
***********
.. todo:: JobTemplate:Development Needs documentation