-
-
Notifications
You must be signed in to change notification settings - Fork 11
47 lines (39 loc) · 1.25 KB
/
vhs-template.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
name: vhs template
on:
workflow_call:
inputs:
topic:
required: true
type: string
jobs:
vhs:
runs-on: ubuntu-latest
continue-on-error: true
container: ghcr.io/carapace-sh/vhs
env:
RC_BASH: "ln -sf /carapace/example/example /usr/local/bin/example"
RC_NUSHELL_ENV: "mkdir ~/.cache/\nexample _carapace nushell | save --force ~/.cache/example.nu"
RC_NUSHELL: "source ~/.cache/example.nu\n$$env.config.completions.external.completer = $$example_completer"
steps:
- name: shallow clone
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: example
path: /usr/local/bin/
- run: chmod +x /usr/local/bin/example
- name: vhs
run: |
cd docs/src/development/vhs/${{ inputs.topic }}
ls *.tape | xargs -n1 vhs
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.topic }}
path: |
docs/src/development/vhs/${{ inputs.topic }}/
!docs/src/development/vhs/${{ inputs.topic }}/*.tape
retention-days: 1
- name: check
run: |
git diff
[ -z "$(git status --porcelain)" ] # clean workspace unless .ascii files changed