Skip to content

Commit

Permalink
Add VHS workflow (#502)
Browse files Browse the repository at this point in the history
* Add VHS workflow

* rebuild readme with latest template

* chore: update demo gif

* set log level

* chore: update demo gif

* try atmos from release

* try atmos from release

* try atmos from release

* chore: update demo gif

* try atmos from release

* chore: update demo gif

* ls colors

* fix syntax

* chore: update demo gif

* remove setup terraform

* chore: update demo gif

* install atmos via gh-release

* install atmos via gh-release

* chore: update demo gif

* install atmos via gh-release

* chore: update demo gif

* chore: update demo gif

---------

Co-authored-by: vhs-action 📼 <[email protected]>
Co-authored-by: Andriy Knysh <[email protected]>
  • Loading branch information
3 people authored Jan 5, 2024
1 parent 539530f commit 0fe4ccc
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/vhs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: vhs
on:
pull_request:
paths:
- '*.tape'

env:
TERM: "xterm-256color"
COLORTERM: "truecolor"
LANG: "en_US.UTF-8"
ATMOS_LOGS_LEVEL: "Info"

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: Install atmos
uses: jaxxstorm/[email protected]
with: # Grab the latest version
repo: cloudposse/atmos
chmod: 0755
extension-matching: disable
rename-to: atmos

- name: Setup shell rc
run: |
echo "alias ls='ls --color=always'" >> ~/.bashrc
- 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
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@



## Screenshots


![Demo](docs/demo.gif)
*<br/>Example of running atmos to describe infrastructure.*


## Introduction
Expand Down Expand Up @@ -189,7 +194,7 @@ under the License.

All other trademarks referenced herein are the property of their respective owners.
---
Copyright © 2017-2023 [Cloud Posse, LLC](https://cpco.io/copyright)
Copyright © 2017-2024 [Cloud Posse, LLC](https://cpco.io/copyright)
[![README Footer][readme_footer_img]][readme_footer_link]
[![Beacon][beacon]][website]
<!-- markdownlint-disable -->
Expand Down
6 changes: 6 additions & 0 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ categories:
- kubernetes
- aws

# Screenshots
screenshots:
- name: "Demo"
description: "<br/>Example of running atmos to describe infrastructure."
url: "docs/demo.gif"

description: |-
`atmos` - Universal Tool for DevOps and Cloud Automation.
Expand Down
75 changes: 75 additions & 0 deletions demo.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Demo of Atmos

Output docs/demo.gif

Set Theme "Monokai Vivid"

Set FontFamily "FiraCode Nerd Font"
#Set FontFamily "Hack Nerd Font"
Set FontSize 14

Set TypingSpeed 40ms

Set Framerate 30

Set WindowBar Colorful

Set CursorBlink true

Set BorderRadius 8

Set Margin 20
Set MarginFill "#674EFF"

Set Padding 12

Set Width 1200
Set Height 600

Set PlaybackSpeed 1

Set Shell bash

Type "# First check you have atmos installed" Sleep 500ms Enter
Type "atmos version" Sleep 500ms Enter
Sleep 1

Type "# Now let's explore the quick start example" Sleep 500ms Enter
Type "cd examples/quick-start" Sleep 500ms Enter

Type "ls -al" Sleep 500ms Enter
Sleep 1

Type "# Let's see what components we have available!" Sleep 500ms Enter
Type "atmos list components" Sleep 500ms Enter
Sleep 500ms

Type "# Let's see where they can be deployed" Sleep 500ms Enter
Type "atmos list stacks" Sleep 500ms Enter

Type "# Let's review the production VPC configuration in the ue2 region..." Sleep 500ms Enter
Type "atmos describe stacks --components=vpc --stack=plat-uw2-prod --sections=vars" Sleep 500ms Enter
Sleep 500ms

Type "# Or checkout all VPCs" Sleep 500ms Enter
Type "atmos describe stacks --components=vpc --sections=vars | less" Sleep 500ms Enter
Sleep 500ms

Down 25 Sleep 500ms
Down 25 Sleep 500ms
Down 25 Sleep 500ms
Down 25 Sleep 500ms

Type "q" Sleep 500ms
Sleep 1
Type "# atmos has a lot of documented commands" Sleep 500ms Enter
Type "atmos --help" Sleep 500ms Enter
Sleep 500ms
Type "# atmos has native workflows for terraform" Sleep 500ms Enter
Type "atmos terraform --help" Sleep 500ms Enter
Sleep 2s
Type "# check out the docs at https://atmos.tools/" Sleep 500ms Enter
Sleep 500ms
Type "# or join us in #atmos at https://slack.cloudposse.com!" Sleep 500ms Enter
Sleep 2s

Binary file added docs/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0fe4ccc

Please sign in to comment.