-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: vhs-action 📼 <[email protected]> Co-authored-by: Benjamin Smith <[email protected]>
- Loading branch information
1 parent
aa27a49
commit 801d8ab
Showing
6 changed files
with
210 additions
and
176 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
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@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- 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 | ||
|
||
- uses: charmbracelet/vhs-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
path: demo.tape | ||
install-fonts: true | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
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 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Required for vhs demo tape | ||
cask "font-fira-code-nerd-font" if OS.mac? | ||
|
Oops, something went wrong.