diff --git a/.github/workflows/vhs.yml b/.github/workflows/vhs.yml index aa0d408a4..489e5d5d5 100644 --- a/.github/workflows/vhs.yml +++ b/.github/workflows/vhs.yml @@ -1,36 +1,13 @@ name: Generate gifs from VHS tapes on: + workflow_dispatch: pull_request: paths: - docs/tapes/*.tape - push: - branches: - - master - - test-vhs - paths: - - docs/tapes/*.tape - jobs: - generate-matrix: - name: Generate job matrices - runs-on: ubuntu-latest - # don't forget to declare outputs here! - outputs: - vhs-files: ${{ steps.vhs-files.outputs.matrix }} - steps: - - name: Generate matrix | VHS Files - id: vhs-files - uses: hellofresh/action-changed-files@v3 - with: - pattern: (?Pdocs/tapes/(?P.+)\.tape) - vhs: - needs: [ generate-matrix ] runs-on: ubuntu-latest - strategy: - matrix: ${{ fromJson(needs.generate-matrix.outputs.vhs-files) }} - if: ${{ fromJson(needs.generate-matrix.outputs.vhs-files).include[0] }} # skip if the matrix is empty! steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v5 @@ -41,9 +18,18 @@ jobs: run: | python -m pip install --upgrade pip pip install git+https://github.com/kapicorp/kapitan@init-with-copier - - uses: charmbracelet/vhs-action@v2.1.0 - with: - path: ${{ matrix.path }} + - name: setup VHS + run: | + go install github.com/charmbracelet/vhs@latest + - name: run VHS + run: | + # shellcheck disable=SC2086 + for file in docs/tapes/*.tape + do + filename="$(basename ${file})" + vhs "${file}" -o "docs/vhs/gifs/${filename%%.tape}.gif" + done + - uses: stefanzweifel/git-auto-commit-action@v4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/docs/vhs/gifs/kapitan-init.gif b/docs/vhs/gifs/kapitan-init.gif new file mode 100644 index 000000000..f00c03b05 Binary files /dev/null and b/docs/vhs/gifs/kapitan-init.gif differ