From 2472ec2bcf5129e9fbd65acfa830a4fee01e3694 Mon Sep 17 00:00:00 2001 From: naanadr Date: Mon, 22 Apr 2024 20:38:03 -0300 Subject: [PATCH] fix: set python version as 3.11.8 Issue: https://github.com/apyb/apyb-bot/issues/13 --- .../workflows/notificar-lista-de-emails.yaml | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/notificar-lista-de-emails.yaml b/.github/workflows/notificar-lista-de-emails.yaml index 279a2b1..9fa962b 100644 --- a/.github/workflows/notificar-lista-de-emails.yaml +++ b/.github/workflows/notificar-lista-de-emails.yaml @@ -1,5 +1,13 @@ 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] @@ -9,16 +17,27 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Setup Python 3.11 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.11 + 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 }} \ No newline at end of file