aliencube / microsoft-teams-actions

This is a GitHub Actions that sends a message to a given channel in Microsoft Teams
MIT License
79 stars 23 forks source link

Allow including Images in sections #9

Open META-DREAMER opened 4 years ago

META-DREAMER commented 4 years ago

Whenever I try to pass images in the sections, it doesn't show up in the output. Example usage: https://stackoverflow.com/questions/56853198/teams-invoke-webrequest-sending-base64-string-png-to-teams/57034497#57034497

My yml file

      - name: Generate QR Code
        id: qrcode
        uses: hammadj/qr-code-generator@master
        with:
          content: exp://exp.host/@foo/bar?release-channel=pr-${{ github.event.number }}
      - name: Send Deploy Preview Notification To MS Teams
        uses: aliencube/microsoft-teams-actions@v0.8.0
        with:
          webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
          title: "TESTING Deploy Preview For PR #${{ github.event.number }} (${{ github.event.pull_request.title }})"
          summary: "Deploy Preview For PR #${{ github.event.number }}"
          text: ${{ github.event.pull_request.body }}
          sections: '[{ "title": "QR Code", "images": [{ "image": "${{ steps.qrcode.output.data }}" }] }]'
          actions: '[{ "@type": "OpenUri", "name": "View PR", "targets": [{ "os": "default", "uri": "${{ github.event.pull_request.html_url }}" }] }, { "@type": "OpenUri", "name": "Preview App", "targets": [{ "os": "default", "uri": "https://expo.io/@danieloertli/unloan-app?release-channel=pr-${{ github.event.number }}" }] }]'
justinyoo commented 4 years ago

@hammadj Thanks for your comment! Let me have a look.

dbaskakov commented 3 years ago

@justinyoo when you fixed it ?