File tree Expand file tree Collapse file tree 12 files changed +226
-0
lines changed Expand file tree Collapse file tree 12 files changed +226
-0
lines changed Original file line number Diff line number Diff line change 91
91
repo-token : ${{ secrets.GITHUB_TOKEN }}
92
92
- run : |
93
93
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
Original file line number Diff line number Diff line change @@ -5,3 +5,12 @@ services:
5
5
- dev
6
6
volumes :
7
7
- ./:/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
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ tasks:
57
57
- task : run-script
58
58
vars :
59
59
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
60
64
silent : true
61
65
62
66
show :
@@ -72,3 +76,30 @@ tasks:
72
76
requires :
73
77
vars :
74
78
- 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
Original file line number Diff line number Diff line change
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: #}
Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change
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.
You can’t perform that action at this time.
0 commit comments