-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (69 loc) · 2.01 KB
/
example.yml
File metadata and controls
75 lines (69 loc) · 2.01 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
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./
with:
input: README.md
output: extracted.sh
tags: bash,ci
- run: sh -xe extracted.sh
multi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./
with:
input: pkg/mdextract/multi.md
multi: true
- run: test -f example.yaml
- run: test -f example.go
- run: test -f example.txt
- run: test -f example.js
extract-shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./
with:
input: .github/workflows/example.md
output: extracted.sh
tags: sh
- run: |
sh -xe extracted.sh | tee extracted.log
grep -q 'hello, world from shell' extracted.log
extract-bash-with-tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./
with:
input: .github/workflows/example.md
output: extracted.bash
tags: bash,ci
- run: |
bash -xe extracted.bash | tee extracted.log
grep -q 'hello, world from bash with ci tag' extracted.log
grep -q 'hello, world from bash with ci and slow' extracted.log
extract-bash-exclude-tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./
with:
input: .github/workflows/example.md
output: extracted.bash
tags: bash,ci
exclude-tags: slow
- run: |
bash -xe extracted.bash | tee extracted.log
grep -q 'hello, world from bash with ci' extracted.log