Skip to content

feat(skills): add Terramate migration reference to atmos-migration #28849

feat(skills): add Terramate migration reference to atmos-migration

feat(skills): add Terramate migration reference to atmos-migration #28849

Workflow file for this run

name: vhs
on:
pull_request:
types: [labeled, opened, synchronize]
env:
TERM: "xterm-256color"
COLORTERM: "truecolor"
LANG: "en_US.UTF-8"
ATMOS_LOGS_LEVEL: "Info"
jobs:
prepare:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Check for vhs label
id: labeled
run: |
labels=$(jq -r '.pull_request.labels[]?.name' "$GITHUB_EVENT_PATH")
if [[ $labels =~ "vhs" ]]; then
echo "labeled=true" >> $GITHUB_OUTPUT
else
echo "labeled=false" >> $GITHUB_OUTPUT
fi
- name: Get modified .tape files
id: tapes
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
IS_LABELED: ${{ steps.labeled.outputs.labeled }}
run: |
# Landing-page tapes (demo/landing/**) are rendered by landing-demos.yaml,
# not here — exclude them so they never enter this matrix.
if [[ "$IS_LABELED" == "true" ]]; then
files=$(find . -path './build-harness' -prune -o -path './demo/landing' -prune -o -type f -name '*.tape' ! -name 'style.tape' ! -name 'defaults.tape' -print | cut -d/ -f2-)
else
files=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA" | grep '\.tape$' | grep -vE '(^|/)(style|defaults)\.tape$' | grep -v '^demo/landing/' | cut -d/ -f2- || true)
fi
# A multi-line value is invalid for $GITHUB_OUTPUT and would break the matrix
# split; collapse to a single space-separated line.
files=$(printf '%s' "$files" | tr '\n' ' ' | sed -E 's/ +/ /g; s/^ //; s/ $//')
echo "files=$files" >> "$GITHUB_OUTPUT"
- name: Set up matrix
id: create-matrix
env:
TAPE_FILES: ${{ steps.tapes.outputs.files }}
run: |
echo "matrix=$(echo -n "$TAPE_FILES" | jq -R -s -c 'split(" ")')" >> $GITHUB_OUTPUT
outputs:
matrix: ${{ steps.create-matrix.outputs.matrix }}
labeled: ${{ steps.labeled.outputs.labeled }}
vhs:
needs: [prepare]
if: needs.prepare.outputs.matrix != '[]'
runs-on: ubuntu-latest
strategy:
matrix:
file: ${{fromJson(needs.prepare.outputs.matrix)}}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.file }}
cancel-in-progress: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install atmos
uses: jaxxstorm/action-install-gh-release@cd6b2b78ad38bdd294341cda064ec0692b06215b # v1.14.0
with: # Grab the latest version
repo: cloudposse/atmos
chmod: 0755
extension-matching: disable
rename-to: atmos
- uses: charmbracelet/vhs-action@5bc47255c016b6af28ad6b633ee9a07b79468804 # v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: ${{ matrix.file }}
install-fonts: true
- uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # 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: actions@github.com
commit_author: vhs-action 📼 <actions@github.com>
file_pattern: '*.gif'
- name: Add Image to Job Summary
if: steps.auto-commit.outputs.changes_detected == 'true'
env:
GH_REPO: ${{ github.repository }}
COMMIT_HASH: ${{ steps.auto-commit.outputs.commit_hash }}
run: |
echo "## Demo GIF" >> $GITHUB_STEP_SUMMARY
echo "![Demo GIF](https://github.com/${GH_REPO}/blob/${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