Skip to content

Commit 6410ee1

Browse files
committed
Added project workflow documentation
1 parent 4e7507e commit 6410ee1

File tree

12 files changed

+226
-0
lines changed

12 files changed

+226
-0
lines changed

.github/workflows/documentation.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,13 @@ jobs:
9191
repo-token: ${{ secrets.GITHUB_TOKEN }}
9292
- run: |
9393
SKIP_FIX=1 task lint:shell-script
94+
95+
lint-yaml:
96+
runs-on: ubuntu-latest
97+
steps:
98+
- uses: actions/checkout@v4
99+
- uses: arduino/setup-task@v2
100+
with:
101+
repo-token: ${{ secrets.GITHUB_TOKEN }}
102+
- run: |
103+
SKIP_FIX=1 task lint:yaml

compose.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ services:
55
- dev
66
volumes:
77
- ./:/md
8+
9+
jinja2-cli:
10+
# https://hub.docker.com/r/roquie/docker-jinja2-cli
11+
# Is https://hub.docker.com/r/stagex/user-py-jinja2 a better choice?
12+
image: roquie/docker-jinja2-cli
13+
profiles:
14+
- dev
15+
volumes:
16+
- ./:/app

task/Taskfile.github-actions.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ tasks:
5757
- task: run-script
5858
vars:
5959
SCRIPT: github-actions-link
60+
- |
61+
for f in $(find templates -mindepth 1 -maxdepth 1 -type d); do
62+
WORKFLOW_FOLDER="$f" task github-actions:workflow-documentation:update
63+
done
6064
silent: true
6165

6266
show:
@@ -72,3 +76,30 @@ tasks:
7276
requires:
7377
vars:
7478
- SCRIPT
79+
80+
workflow-documentation:update:
81+
cmds:
82+
- defer: rm {{.DATA_PATH}}
83+
- |
84+
: > {{.DATA_PATH}}
85+
(
86+
echo "repository:"
87+
# TODO Get this URL from `git`
88+
echo " url: 'https://github.com/itk-dev/devops_itkdev-docker'"
89+
echo " name: 'ITK-dev docker setup'"
90+
) >> {{.DATA_PATH}}
91+
echo "files:" >> {{.DATA_PATH}}
92+
for f in $(find {{.WORKFLOW_FOLDER}} -name '*.yaml'); do
93+
echo " - $(basename "$f")" >> {{.DATA_PATH}}
94+
done
95+
96+
- cat {{.DATA_PATH}}
97+
98+
- docker compose run --rm jinja2-cli --strict --format=yaml {{.TEMPLATE_PATH}} {{.DATA_PATH}} | tee {{.WORKFLOW_FOLDER}}/README.workflows.md
99+
- task lint:markdown
100+
vars:
101+
TEMPLATE_PATH: task/templates/README.workflows.md.j2
102+
DATA_PATH: tmp-data.yaml
103+
requires:
104+
vars:
105+
- WORKFLOW_FOLDER

task/templates/README.workflows.md.j2

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Workflow templates
2+
3+
The {{files|length}} workflow files
4+
5+
{% for file in files -%}
6+
* [{{ file }}]({{file}})
7+
{% endfor %}
8+
9+
in this folder are generated from <{{repository.url}}>.
10+
11+
See [Github Actions templates]({{repository.url}}/blob/develop/docs/github-actions-templates.md)
12+
for general information on the workflow templates.
13+
14+
[Create a pull request]({{repository.url}}/pulls) to fix any bugs you find
15+
or to add new or missing features.
16+
17+
{# Local Variables: #}
18+
{# mode: markdown #}
19+
{# End: #}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Workflow templates
2+
3+
The 8 workflow files
4+
5+
* [twig.yaml](twig.yaml)
6+
* [site.yaml](site.yaml)
7+
* [markdown.yaml](markdown.yaml)
8+
* [javascript.yaml](javascript.yaml)
9+
* [styles.yaml](styles.yaml)
10+
* [php.yaml](php.yaml)
11+
* [composer.yaml](composer.yaml)
12+
* [changelog.yaml](changelog.yaml)
13+
14+
in this folder are generated from <https://github.com/itk-dev/devops_itkdev-docker>.
15+
16+
See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md)
17+
for general information on the workflow templates.
18+
19+
[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find
20+
or to add new or missing features.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Workflow templates
2+
3+
The 8 workflow files
4+
5+
* [twig.yaml](twig.yaml)
6+
* [site.yaml](site.yaml)
7+
* [markdown.yaml](markdown.yaml)
8+
* [javascript.yaml](javascript.yaml)
9+
* [styles.yaml](styles.yaml)
10+
* [php.yaml](php.yaml)
11+
* [composer.yaml](composer.yaml)
12+
* [changelog.yaml](changelog.yaml)
13+
14+
in this folder are generated from <https://github.com/itk-dev/devops_itkdev-docker>.
15+
16+
See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md)
17+
for general information on the workflow templates.
18+
19+
[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find
20+
or to add new or missing features.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Workflow templates
2+
3+
The 8 workflow files
4+
5+
* [twig.yaml](twig.yaml)
6+
* [site.yaml](site.yaml)
7+
* [markdown.yaml](markdown.yaml)
8+
* [javascript.yaml](javascript.yaml)
9+
* [styles.yaml](styles.yaml)
10+
* [php.yaml](php.yaml)
11+
* [composer.yaml](composer.yaml)
12+
* [changelog.yaml](changelog.yaml)
13+
14+
in this folder are generated from <https://github.com/itk-dev/devops_itkdev-docker>.
15+
16+
See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md)
17+
for general information on the workflow templates.
18+
19+
[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find
20+
or to add new or missing features.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Workflow templates
2+
3+
The 8 workflow files
4+
5+
* [twig.yaml](twig.yaml)
6+
* [site.yaml](site.yaml)
7+
* [markdown.yaml](markdown.yaml)
8+
* [javascript.yaml](javascript.yaml)
9+
* [styles.yaml](styles.yaml)
10+
* [php.yaml](php.yaml)
11+
* [composer.yaml](composer.yaml)
12+
* [changelog.yaml](changelog.yaml)
13+
14+
in this folder are generated from <https://github.com/itk-dev/devops_itkdev-docker>.
15+
16+
See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md)
17+
for general information on the workflow templates.
18+
19+
[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find
20+
or to add new or missing features.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Workflow templates
2+
3+
The 8 workflow files
4+
5+
* [twig.yaml](twig.yaml)
6+
* [site.yaml](site.yaml)
7+
* [markdown.yaml](markdown.yaml)
8+
* [javascript.yaml](javascript.yaml)
9+
* [styles.yaml](styles.yaml)
10+
* [php.yaml](php.yaml)
11+
* [composer.yaml](composer.yaml)
12+
* [changelog.yaml](changelog.yaml)
13+
14+
in this folder are generated from <https://github.com/itk-dev/devops_itkdev-docker>.
15+
16+
See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md)
17+
for general information on the workflow templates.
18+
19+
[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find
20+
or to add new or missing features.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Workflow templates
2+
3+
The 7 workflow files
4+
5+
* [twig.yaml](twig.yaml)
6+
* [markdown.yaml](markdown.yaml)
7+
* [javascript.yaml](javascript.yaml)
8+
* [styles.yaml](styles.yaml)
9+
* [php.yaml](php.yaml)
10+
* [composer.yaml](composer.yaml)
11+
* [changelog.yaml](changelog.yaml)
12+
13+
in this folder are generated from <https://github.com/itk-dev/devops_itkdev-docker>.
14+
15+
See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md)
16+
for general information on the workflow templates.
17+
18+
[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find
19+
or to add new or missing features.

0 commit comments

Comments
 (0)