-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
67 lines (57 loc) · 2.08 KB
/
Taskfile.yml
File metadata and controls
67 lines (57 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# https://taskfile.dev
version: "3"
includes:
github-actions: ./task/Taskfile.github-actions.yml
completion:
taskfile: ./completion/Taskfile.yml
dir: ./completion
vars:
GITHUB_ACTIONS_TEMPLATES_HEADER: |
# Github Actions templates
This repository contains a number of [GitHub
Actions](https://docs.github.com/en/actions) workflow template files that
are copied to a project when running `itkdev-docker-compose
template:install`. Any changes to the workflows should be made in [this
repository](%THIS_REPOSITORY%) and then the project template must be updated
to match the new templates.
GITHUB_ACTIONS_TEMPLATES_FOOTER: |
tasks:
build:
desc: "Build everything"
cmds:
- task: github-actions:config-headers:update
- task: github-actions:template-headers:update
- task: github-actions:documentation:update
- task: github-actions:link
- task: lint:markdown
- task: lint:yaml
lint:markdown:
desc: "Lint Markdown"
cmds:
- '[[ -n "$SKIP_FIX" ]] || docker run --rm --volume "$PWD":/md itkdev/markdownlint markdownlint {{.GLOB}} --fix'
- docker run --rm --volume "$PWD":/md itkdev/markdownlint markdownlint {{.GLOB}}
vars:
# We use a block scalar (https://yaml-multiline.info/#block-scalars) here to make escaping (a little) easier.
GLOB: >-
{{.CLI_ARGS | default "'**/*.md'"}}
lint:shell-script:
desc: "Lint shell scripts"
cmds:
# https://github.com/koalaman/shellcheck?tab=readme-ov-file#installing
- docker run --rm --volume "$PWD:"/mnt koalaman/shellcheck:stable {{.GLOB}}
vars:
# We use a block scalar (https://yaml-multiline.info/#block-scalars) here to make escaping (a little) easier.
GLOB: >-
{{.CLI_ARGS | default "task/scripts/*"}}
lint:yaml:
desc: "Lint YAML"
cmds:
- |
# docker pull mikefarah/yq
for f in $(find github/workflows/ -name '*.yaml'); do
docker run --rm --volume "$PWD":/workdir mikefarah/yq "$f" > /dev/null
done
default:
cmds:
- task --list
silent: true