-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
103 lines (95 loc) · 2.6 KB
/
Taskfile.yml
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
99
100
101
102
103
---
# https://taskfile.dev
version: "3"
includes:
# Misc
manual: ./misc/manual/task.yaml
# Tools
1password: ./tools/1password/task.yaml
aws: ./tools/aws/task.yaml
dotnet6: ./tools/dotnet/6/task.yaml
dotnet7: ./tools/dotnet/7/task.yaml
github: ./tools/github/task.yaml
go1.20: ./tools/go/1.20/task.yaml
go1.21: ./tools/go/1.21/task.yaml
kubectl: ./tools/kubectl/task.yaml
k3d: ./tools/k3d/task.yaml
node: ./tools/node/task.yaml
orbstack: ./tools/orbstack/task.yaml
pulumi: ./tools/pulumi/task.yaml
python: ./tools/python/task.yaml
rancher: ./tools/rancher/task.yaml
sops: ./tools/sops/task.yaml
tilt: ./tools/tilt/task.yaml
yamlfmt: ./tools/yamlfmt/task.yaml
yq: ./tools/yq/task.yaml
tasks:
default:
cmds:
- task --list
silent: true
# Node depends on nvm, which uses shell variables to modify the environment.
# For this reason, it might be simpler to use the node:node and node:npm
# tasks, rather than relying on users to setup their environment.
node-run:
desc: Run node
silent: true
cmds:
- echo "Running node {{.CLI_ARGS}}"
- task: node:node
vars:
ARGS: "{{.CLI_ARGS}}"
npm-run:
desc: Run npm
silent: true
cmds:
- echo "Running node {{.CLI_ARGS}}"
- task: node:npm
vars:
ARGS: "{{.CLI_ARGS}}"
manual-secret:
desc: Request user to manually enter a secret
silent: true
status:
- grep "SECRET=.*" .env
cmds:
- task: manual:prompt_secret
vars:
INSTRUCTIONS: |
What is the secret?
1. Go to this super secret URL ...
2. Copy the secret from the page.
3. Enter it below.
OUTPUT_FILE: ".env"
OUTPUT_APPEND: true
OUTPUT_TEMPLATE: "SECRET=$SECRET"
manual-value:
desc: Request user to manually enter a secret
silent: true
status:
- grep "VALUE=.*" .env
cmds:
- task: manual:prompt_value
vars:
INSTRUCTIONS: |
What is the value?
1. Go to this super awesome URL ...
2. Copy the value from the page.
3. Enter it below.
OUTPUT_FILE: ".env"
OUTPUT_APPEND: true
OUTPUT_TEMPLATE: "VALUE=$SECRET"
fetch-secret:
desc: Fetch a secret from 1Password
silent: true
vars:
TEMP_DIR:
sh: mktemp -d
cmds:
- defer: rm -rf "{{.TEMP_DIR}}"
- task: 1password:fetch
vars:
KEY: "pkwmme3omm3owhvcwbwxrrpzuy"
FIELDS: "notesPlain"
OUTPUT: "{{.TEMP_DIR}}/secret.txt"
- cat "{{.TEMP_DIR}}/secret.txt"