-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (74 loc) · 1.93 KB
/
generate_demo.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
name: Generate Demos
on:
workflow_dispatch:
pull_request:
branches:
- master
permissions:
contents: write
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Build
run: go build .
record-receiver:
runs-on: ubuntu-latest
needs: [setup]
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
sparse-checkout: receiver_demo.tape
- name: Record receiver
uses: charmbracelet/[email protected]
with:
path: 'receiver_demo.tape'
- name: Upload receiver demo
uses: actions/upload-artifact@v3
with:
name: receiver_demo
path: receiver_demo.gif
record-sender:
runs-on: ubuntu-latest
needs: [setup]
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
sparse-checkout: sender_demo.tape
- name: Download a 200MB test file
run: curl -LJO http://ipv4.download.thinkbroadband.com/200MB.zip
- name: Record sender
uses: charmbracelet/[email protected]
with:
path: 'sender_demo.tape'
- name: Upload sender demo
uses: actions/upload-artifact@v3
with:
name: sender_demo
path: sender_demo.gif
Commit:
runs-on: ubuntu-latest
needs: [record-receiver, record-sender]
steps:
- name: Check out repo
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: sender_demo
path: sender_demo.gif
- uses: actions/download-artifact@v3
with:
name: receiver_demo
path: receiver_demo.gif
- run: |-
git config --global user.email "[email protected]"
git config --global user.name "DEMO-bot"
git add sender_demo.gif receiver_demo.gif && git commit -m "Updated Demo"
git push