-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
37 lines (37 loc) · 1.09 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: 'pymsnotify'
author: "Ayush Kumar"
description: 'A GitHub Action that takes microsoft teams webhook url as input and send notification to teams channel'
branding:
icon: 'send'
color: 'blue'
inputs:
url:
description: 'teams channel webhook url'
required: true
content:
description: 'notification message content'
required: true
title:
description: 'notification title'
required: true
runs:
using: 'composite'
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dependencies
run: pip install -r ${{github.action_path}}/requirements.txt
shell: bash
- name: Pass Inputs to Shell
run: |
echo "URL=${{ inputs.url }}" >> $GITHUB_ENV
echo "CONTENT=${{ inputs.content }}" >> $GITHUB_ENV
echo "TITLE=${{ inputs.title }}" >> $GITHUB_ENV
shell: bash
- name: Send notification to specified teams channel
id: send-notification
run: python ${{github.action_path}}/src/main.py
shell: bash