Skip to content

Notifica Lista de E-mail da Associação #43

Notifica Lista de E-mail da Associação

Notifica Lista de E-mail da Associação #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 }}