microsoft-teams icon indicating copy to clipboard operation
microsoft-teams copied to clipboard

Please support GitHub Actions

Open mmerdes opened this issue 3 years ago • 12 comments

Feedback on the state of the build would be highly appreciated, especially notifications of failed builds.

mmerdes avatar Sep 15 '20 12:09 mmerdes

@mmerdes Thanks for your feedback. Yes, support for GitHub Actions is in our Roadmap. We will work on it early next year.

ashokirla avatar Sep 15 '20 12:09 ashokirla

Hi @ashokirla , how is this progressing?

I'd like to trigger actions (using a workflow_dispatch event) with a custom parameter set, is that something you are considering as well?

Thanks

cdelgadob avatar Feb 15 '21 09:02 cdelgadob

I can't vouch for the code, but I just used this and it worked 👌🏻 https://github.com/aliencube/microsoft-teams-actions

E.g:

      - name: Send a message to Teams on failure
        if: ${{ failure() }}
        uses: aliencube/[email protected]
        with:
          webhook_uri: https://outlook.office.com/webhook/<GUID>/IncomingWebhook/<GUID>
          summary: Build failed
          text: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

davetapley avatar Mar 17 '21 03:03 davetapley

@davetapley : can you please share the card/ notification you are seeing on teams ?

gauravsaralMs avatar Mar 17 '21 03:03 gauravsaralMs

I'm sure it could be made prettier 🙈

Microsoft_Teams

davetapley avatar Mar 17 '21 04:03 davetapley

Do we have any updates on this? Apparently, we cannot use non github certified actions

bvxzee avatar Apr 06 '21 13:04 bvxzee

Any hope this can be implemented somewhere soon ? 🙏

eerkunt avatar May 17 '21 08:05 eerkunt

+1

cquanu avatar May 17 '21 08:05 cquanu

Here is a job that can post to MS Teams if a build has failed, without using external code. Something to use until this feature is done.

  post-build-failures:
    name: Post failures to MS Teams
    runs-on: ubuntu-latest
    needs: [build, test]
    if: failure() && github.event_name == 'push'
    steps:
      - name: Generate variables
        run: |
          echo '${{ toJSON(needs) }}' > /tmp/needs.json
          echo 'FAILEDJOBS='$(cat /tmp/needs.json | jq 'path(.[] | select(.result=="failure"))' | jq -rs 'flatten | join(", ")') >> $GITHUB_ENV
          
          echo 'MSG<<EOF' >> $GITHUB_ENV
          echo 'Author: ${{ github.event.head_commit.author.name }}\n\nCommit: ${{ github.event.head_commit.message }}' >> $GITHUB_ENV
          echo 'EOF' >> $GITHUB_ENV
      - name: Post WebHook to MS Teams
        run: |
          curl -X POST <Incoming Webhook URL> -d '{
            "@context": "https://schema.org/extensions",
            "@type": "MessageCard",
            "themeColor": "A1051D",
            "title": "${{ env.FAILEDJOBS }} step has failed",
            "text": "${{ env.MSG }}\n\nClick **View Details** to learn more",
            "potentialAction": [
              {
                "@type": "OpenUri",
                "name": "View Details",
                "targets": [
                  { "os": "default", "uri": "https://github.com/<User>/<Repository>/actions/runs/${{ github.run_id }}" }
                ]
              }
            ]
          }'

Things for you to replace:

<Incoming Webhook URL>
<User>
<Repository>

image

daidnoggin avatar Jun 07 '21 11:06 daidnoggin

@ashokirla any update on this feature please?

paratala-vijaymohan avatar Jun 07 '21 13:06 paratala-vijaymohan

Hi, We are currently working on introducing notifications when you deploy to an environment from your actions workflow.

  1. Deployment review request notification on an environment
  2. Deployment review completed notifications for an environment
  3. Status of deployment to an environment. We are targetting to ship the support in this quarter.

ashokirla avatar Jul 13 '21 11:07 ashokirla

@ashokirla Any updates on this issue?

ScottHoward4 avatar Jul 05 '22 18:07 ScottHoward4