microsoft-teams
microsoft-teams copied to clipboard
Please support GitHub Actions
Feedback on the state of the build would be highly appreciated, especially notifications of failed builds.
@mmerdes Thanks for your feedback. Yes, support for GitHub Actions is in our Roadmap. We will work on it early next year.
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
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 : can you please share the card/ notification you are seeing on teams ?
I'm sure it could be made prettier 🙈
![Microsoft_Teams](https://user-images.githubusercontent.com/48232/111415827-ee3f9b00-869f-11eb-89ec-2b515bdd2d19.png)
Do we have any updates on this? Apparently, we cannot use non github certified actions
Any hope this can be implemented somewhere soon ? 🙏
+1
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>
@ashokirla any update on this feature please?
Hi, We are currently working on introducing notifications when you deploy to an environment from your actions workflow.
- Deployment review request notification on an environment
- Deployment review completed notifications for an environment
- Status of deployment to an environment. We are targetting to ship the support in this quarter.
@ashokirla Any updates on this issue?