Skip to content

ci(demo): pin vhs to v0.11.0 — v0.12.0 silently renders no gif #16

ci(demo): pin vhs to v0.11.0 — v0.12.0 silently renders no gif

ci(demo): pin vhs to v0.11.0 — v0.12.0 silently renders no gif #16

Workflow file for this run

name: demo
on:
workflow_dispatch: {}
push:
tags: ["v*.*.*"]
permissions:
contents: write
jobs:
vhs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Build binary for the demo
run: go build -o /usr/local/bin/fuse ./cmd/fuse
- name: Install vhs + deps (ffmpeg, ttyd, vhs)
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y ffmpeg
sudo curl -fsSL -o /usr/local/bin/ttyd https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64
sudo chmod +x /usr/local/bin/ttyd
# v0.14: fix-demo-workflow-detached-head-push — pin vhs to the last
# version that renders this tape (v0.11.0, the version the 2026-09-01
# v0.13.0 run used). vhs v0.12.0 (released 2026-09-09) prints
# "Creating assets/demo.gif..." and exits 0 in ~0.4s without writing
# any file, so `git add assets/demo.gif` then failed with "pathspec
# did not match any files" — the render must be reproducible, not
# floating with @latest (ttyd is pinned for the same reason).
go install github.com/charmbracelet/vhs@v0.11.0
- name: Render demo.gif
run: |
export PATH="$(go env GOPATH)/bin:$PATH"
vhs docs/demo.tape
- name: Commit rendered gif
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add assets/demo.gif
git commit -m "chore: render demo gif" || { echo "no change"; exit 0; }
# v0.14: fix-demo-workflow-detached-head-push — this workflow runs on
# tag pushes, and actions/checkout checks the tag out as a DETACHED
# HEAD, so a bare `git push` failed with "fatal: You are not
# currently on a branch." (exit 128) on every tag since v0.4.0,
# discarding the rendered gif. Push the detached HEAD explicitly.
git push origin HEAD:main