Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple tape files? #50

Open
ghost opened this issue Dec 29, 2022 · 4 comments
Open

Support for multiple tape files? #50

ghost opened this issue Dec 29, 2022 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 29, 2022

Hey Charm!

First off, I'm a big fan.

I'm integrating VHS into a new open source CLI here at SailPoint:
sailpoint-oss/sailpoint-cli#23

I was looking at utilizing this Action in the pipeline for that project, but I am creating tape files for most all of the independent CLI commands, and I can't tell if this action supports inputing multiple tape files?

If not I suppose I can just emulate the action in a more standard GH Workflow

@spenserblack
Copy link

To make a suggestion, I think this would be good usage, and I've seen many other actions do the same:

- uses: charmbracelet/vhs-action@<commit-ish>
  with:
    path: |
      path.tape
      path/with/glob/*.tape

In other words, path could be a newline-separated list of glob patterns.

@mfigurski80
Copy link

I'd absolutely love this feature. I'm currently using a workaround solution of basically installing VHS and its dependencies manually and then using a small bash script to iterate over images/*.tape files. For reference, if anybody else is looking at this thread, that GitHub workflow is public here: https://github.com/mfigurski80/NTPeek/blob/master/.github/workflows/vhs.yml

@spenserblack
Copy link

Also, if #56 and charmbracelet/vhs#211 then the usage could also potentially just be

- uses: charmbracelet/setup-vhs@main
- run: vhs **.tape

@ademariag
Copy link

FYI I am using this:

name: Generate gifs from VHS tapes
on:
  pull_request:
    paths:
      - docs/tapes/*.tape

jobs:
  generate-matrix:
    name: Generate job matrices
    runs-on: ubuntu-latest
    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: (?P<path>docs/tapes/(?P<tape>.+)\.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] }}
    steps:
      - uses: actions/checkout@v3
      - uses: charmbracelet/[email protected]
        with:
          path: ${{ matrix.path }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants