fix: using vhs action #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Record receiver | ||
uses: charmbracelet/vhs-action@v2.0.0 | ||
with: | ||
path: 'receiver_demo.tape' | ||
record-sender: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
steps: | ||
- name: Download a 200MB test file | ||
run: curl -LJO http://ipv4.download.thinkbroadband.com/200MB.zip | ||
- name: Record sender | ||
uses: charmbracelet/vhs-action@v2.0.0 | ||
with: | ||
path: 'sender_demo.tape' | ||
Commit: | ||
runs-on: ubuntu-latest | ||
needs: [record-receiver, record-sender] | ||
steps: | ||
- run: |- | ||
cd main | ||
git config --global user.email "actions@users.noreply.github.com" | ||
git config --global user.name "DEMO-bot" | ||
git add sender_demo.gif receiver_demo.gif && git commit -m "Updated Demo" | ||
git push |