Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
98 lines (79 loc) · 2.19 KB
/
Copy pathTaskfile.yml
File metadata and controls
98 lines (79 loc) · 2.19 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: '3'
silent: true
set: [errexit, nounset, pipefail]
vars:
ACTIONS:
sh: find . -name 'action.yaml' -not -path './node_modules/*' -print0 | sort -z | xargs -0
tasks:
default:
desc: List available tasks.
cmds:
- task --list
### Node.js tasks ###
npm:ci:
desc: Install Node.js dependencies.
cmds:
- npm ci --ignore-scripts --no-audit --no-fund
test:
desc: Run unit and local integration tests.
deps: [npm:ci]
cmds:
- npm test
test:helm:
desc: Run Helm packaging integration tests.
deps: [npm:ci]
cmds:
- npm run test:helm
test:task:
desc: Run Task target integration tests.
deps: [npm:ci]
cmds:
- npm run test:task
### Lint tasks ###
lint:actions:
desc: Validate GitHub Actions and composite actions.
aliases: [lint-actions]
cmds:
- node scripts/lint.mjs
lint:shell:
desc: Check shell scripts with shellcheck.
aliases: [lint-shell]
cmds:
- shellcheck helm-oci-chart/publish.sh task-ko-publish/publish.sh
lint:zizmor:
desc: Security-lint GitHub Actions workflows and composite actions with zizmor.
aliases: [lint-zizmor]
cmds:
- zizmor -q .github/workflows/ {{.ACTIONS}}
lint:zizmor-fix:
desc: Security-lint GitHub Actions workflows and composite actions with zizmor and auto-fix.
aliases: [lint-zizmor-fix]
cmds:
- zizmor -q .github/workflows/ {{.ACTIONS}} --fix=all
### Action exercises ###
exercise:exists:
desc: Exercise the exists action with sample inputs.
cmds:
- |
# Simulate the exists action's composite step logic
value="example"
if [ -n "$value" ]; then echo "true"; else echo "false"; fi
- |
value=""
if [ -n "$value" ]; then echo "true"; else echo "false"; fi
### Aggregate checks ###
check:
desc: Run the checks used by CI (e2e runs separately).
cmds:
- task: npm:ci
- task: test
- task: test:helm
- task: test:task
- task: lint:actions
- task: lint:shell
- task: lint:zizmor
check:full:
desc: Run all CI checks including action exercises.
cmds:
- task: check
- task: exercise:exists