Skip to content

Publish gif with vhs publish directly #279

@Eldolfin

Description

@Eldolfin

Is your feature request related to a problem? Please describe.
Instead of having to create a imgur api for the comment-pr.yml example, why not directly publish it using the vhs publish command?

Describe the solution you'd like
An option on the action publish: false by default which would call vhs publish.
It would add an output to the action with the gif url.

Describe alternatives you've considered
Using any other service that allows publishing gif without an api.

Additional context
the action would look like this

name: comment gif
on:
  pull_request:
    paths:
      - vhs.tape
jobs:
  pr:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: charmbracelet/vhs-action@v1
+       id: vhs_step
        with:
          path: 'vhs.tape'
+         publish: true 

-    - uses: devicons/public-upload-to-imgur@v2.2.2
-        id: imgur_step
-        with:
-          path: ./vhs.gif
-          client_id: ${{ secrets.IMGUR_CLIENT_ID }} # Make sure you have this secret set in your repo

      - uses: github-actions-up-and-running/pr-comment@v1.0.1
        env:
-          IMG_URL: ${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[0] }}
+          IMG_URL: ${{ steps.vhs_step.outputs.gif-url }}
          MESSAGE: |
            ![VHS GIF]({0})
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          message: ${{ format(env.MESSAGE, env.IMG_URL) }}
          ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions