Code Monkey home page Code Monkey logo

Comments (3)

peter-evans avatar peter-evans commented on June 1, 2024 1

Hi @webignition

It should be doable without needing to alter the action by reading the file in a previous workflow step. Actions are designed to be chained together like this for simplicity/modularity.

      - id: get-payload
        run: echo ::set-output name=payload::$(cat my-payload.json)

      - name: Repository Dispatch
        uses: peter-evans/repository-dispatch@v1
        with:
          token: ${{ secrets.PAT }}
          repository: username/my-repo
          event-type: my-event
          client-payload: ${{ steps.get-payload.outputs.payload }}

from repository-dispatch.

webignition avatar webignition commented on June 1, 2024

Thanks for the prompt reply.

Yes, I can certainly do this and am doing so in cases where the client-payload json is too complex to handle directly in the workflow. Having done so a few times, I considered how this could be handled more easily, hence this feature request.

I'm perfectly happy to abide by your choice to not implement the feature but thought it worth mentioning as it might make the usage of more complex json payloads easier to adopt for those less familiar with how one might utilise the output of a previous step.

Please feel free to close this issue if you don't feel that the feature fits with you vision.

from repository-dispatch.

peter-evans avatar peter-evans commented on June 1, 2024

In general, I've pushed back on adding file IO features like this into all the actions I maintain. This is often requested for the body input in create-pull-request and create-or-update-comment, for example. I think actions should do one thing and do it well, and I'm trying very hard to keep their input interfaces clean and not bloat them with features. If I add something like this, other users will come along and ask for templating features or other content modification. It just makes sense to me for all these use cases to be separate steps.

Thank you for raising the issue, though. I appreciate the desire to improve the action. 👍

from repository-dispatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.