-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (38 loc) · 1.48 KB
/
notificar-lista-de-emails.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
38
39
40
41
42
43
name: Notifica Lista de E-mail da Associação
on:
workflow_dispatch:
inputs:
number:
description: 'GitHub Discussion Number'
required: true
email_test:
description: 'Emal that will receive the test message'
required: true
discussion:
types: [created]
jobs:
notify_associates:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11.8'
- name: Instala apyb-bot
run: pip install git+https://github.com/apyb/apyb-bot.git
- name: Notifica lista de e-mail da APyB
if: ${{ github.event.inputs.number == '' }}
env:
APYB_BOT_GITHUB_TOKEN: ${{ secrets.APYB_BOT_GITHUB_TOKEN }}
APYB_BOT_NO_REPLY_PASSWORD: ${{ secrets.APYB_BOT_NO_REPLY_PASSWORD }}
APYB_BOT_SEND_TO: ${{ secrets.APYB_BOT_SEND_TO }}
run: apyb-bot github:new-discussion-notification --id ${{ github.event.discussion.number }}
- name: Execução de teste
if: ${{ github.event.inputs.number != '' }}
env:
APYB_BOT_GITHUB_TOKEN: ${{ secrets.APYB_BOT_GITHUB_TOKEN }}
APYB_BOT_NO_REPLY_PASSWORD: ${{ secrets.APYB_BOT_NO_REPLY_PASSWORD }}
APYB_BOT_SEND_TO: ${{ github.event.inputs.email_test }}
run: apyb-bot github:new-discussion-notification --id ${{ github.event.inputs.number }}