PR & Release management maintenance #73
Workflow file for this run
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: vhs | |
on: | |
pull_request: | |
paths: | |
- '*.tape' | |
env: | |
TERM: "xterm-256color" | |
COLORTERM: "truecolor" | |
LANG: "en_US.UTF-8" | |
ENV_FILE: "/home/runner/gha.env" | |
jobs: | |
vhs: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: "Override Env for Geodesic Demo Purposes" | |
run: | | |
echo "PROMPT_STYLE=unicode" > ${ENV_FILE} | |
echo "BANNER_MARK=π" >> ${ENV_FILE} | |
echo "ASSUME_ROLE_INACTIVE_MARK= " >> ${ENV_FILE} | |
echo "PROMPT_HOST_MARK=(demo)" >> ${ENV_FILE} | |
# Speed up builds for demo by pre-building docker image | |
- name: "make all" | |
run: make all | |
# We need to install the Hack Nerd Font for the demo | |
# but vhs-action will not install it for us due to issue 264 | |
- name: Install Hack Nerd Font | |
run: | | |
curl -sSLO https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Hack.zip | |
unzip -d hack_nerd_font Hack.zip | |
mv hack_nerd_font/ /usr/local/share/fonts/ | |
fc-cache -fv || true | |
- uses: charmbracelet/vhs-action@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: demo.tape | |
# Cannot use `install-fonts`: https://github.com/charmbracelet/vhs-action/issues/264 | |
# install-fonts: true | |
install-fonts: false | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
id: auto-commit | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
commit_message: "chore: update demo gif" | |
commit_user_name: vhs-action πΌ | |
commit_user_email: [email protected] | |
commit_author: vhs-action πΌ <[email protected]> | |
file_pattern: '*.gif' | |
- name: Add Image to Job Summary | |
if: steps.auto-commit.outputs.changes_detected == 'true' | |
run: | | |
echo "## Demo GIF" >> $GITHUB_STEP_SUMMARY | |
echo "![Demo GIF](https://github.com/${{ github.repository }}/blob/${{ steps.auto-commit.outputs.commit_hash }}/docs/demo.gif?raw=true)" >> $GITHUB_STEP_SUMMARY | |
- name: No changes | |
if: steps.auto-commit.outputs.changes_detected == 'false' | |
run: | | |
echo "No changes to demo" >> $GITHUB_STEP_SUMMARY | |