GithubHelp home page GithubHelp logo

Comments (2)

peter-evans avatar peter-evans commented on July 19, 2024

Hi @nurirppan

It's a bit difficult to understand what you are trying to do here, but perhaps you need fromJson like this:

needs: ${{ fromJson(github.event.client_payload.needs) }}
job: ${{ fromJson(github.event.client_payload.job) }}
steps: ${{ fromJson(github.event.client_payload.steps) }}

I don't know, though. This is just a guess.

from repository-dispatch.

nurirppan avatar nurirppan commented on July 19, 2024

Hi @nurirppan

It's a bit difficult to understand what you are trying to do here, but perhaps you need fromJson like this:

needs: ${{ fromJson(github.event.client_payload.needs) }}
job: ${{ fromJson(github.event.client_payload.job) }}
steps: ${{ fromJson(github.event.client_payload.steps) }}

I don't know, though. This is just a guess.

hello sir, i got this error
Error: .github/workflows/cn_teams.yml (Line: 44, Col: 18):
Error: .github/workflows/cn_teams.yml (Line: 45, Col: 16):
Error: .github/workflows/cn_teams.yml (Line: 46, Col: 18):
Error: The template is not valid. .github/workflows/cn_teams.yml (Line: 44, Col: 18): Unexpected character encountered while parsing value: O. Path '', line 0, position 0.,.github/workflows/cn_teams.yml (Line: 45, Col: 16): Unexpected character encountered while parsing value: O. Path '', line 0, position 0.,.github/workflows/cn_teams.yml (Line: 46, Col: 18): Unexpected character encountered while parsing value: O. Path '', line 0, position 0.

i implent like this
a.yml

      - name: Repository Dispatch
        uses: peter-evans/repository-dispatch@v2
        if: always()
        with:
          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
          repository: abc/def
          event-type: cd_development_event
          client-payload: >-
            {
                "sha": "${{ github.sha }}",
                "ref": "${{ github.ref }}",
                "configuration": "${{ github.event.inputs.configuration }}",
                "deployment": "${{ github.event.inputs.deployment }}",
                "note": "${{ github.event.inputs.note }}",
                "webhook": "${{ secrets.WEBHOOK_TEAMS_DEVELOPMENT }}",
                "needs": ${{ toJson(needs) }},
                "job": ${{ toJson(job) }},
                "steps": ${{ toJson(steps) }}
            }
b.yml
      - name: Send a Report
        uses: skitionek/notify-microsoft-teams@master
        with:
          webhook_url: ${{ github.event.client_payload.webhook }}
          needs: ${{ fromJson(github.event.client_payload.needs) }}
          job: ${{ fromJson(github.event.client_payload.job) }}
          steps: ${{ fromJson(github.event.client_payload.steps) }}
          # needs: ${{ toJson(needs) }} # ${{ github.event.client_payload.needs }}
          # job: ${{ toJson(job) }} # ${{ github.event.client_payload.job }}
          # steps: ${{ toJson(steps) }} # ${{ github.event.client_payload.steps }}
          # needs: ${{ github.event.client_payload.needs }}
          # job: ${{ github.event.client_payload.job }}
          # steps: ${{ github.event.client_payload.steps }}

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.