Skip to content

Commit

Permalink
Alterado para usar variaveis do GitHub que não sejam secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielRF committed Mar 3, 2023
1 parent 85c9d72 commit 216b9f8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
- name: Run Rss to Telegram
run: python rss2telegram.py
env:
DESTINATION: ${{ secrets.DESTINATION }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
URL: ${{ secrets.URL }}
EMOJIS: ${{ secrets.EMOJIS }}
MESSAGE_TEMPLATE: ${{ secrets.MESSAGE_TEMPLATE }}
BUTTON_TEXT: ${{ secrets.BUTTON_TEXT }}
PARAMETERS: ${{ secrets.PARAMETERS }}
DESTINATION: ${{ vars.DESTINATION }}
URL: ${{ vars.URL }}
EMOJIS: ${{ vars.EMOJIS }}
MESSAGE_TEMPLATE: ${{ vars.MESSAGE_TEMPLATE }}
BUTTON_TEXT: ${{ vars.BUTTON_TEXT }}
PARAMETERS: ${{ vars.PARAMETERS }}
DRYRUN: ${{ steps.download.outcome }}
- name: Upload history
uses: actions/upload-artifact@v3
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ Issues também são sempre bem vindas.

Defina as variáveis na aba `Secrets` do repositório:

`DESTINATION`: Destinos das mensagens separados por vírgulas (`@destino` ou ID). Opcionalmente, remova a variável e crie um arquivo de nome `DESTINATION.txt` com os valores;
`BOT_TOKEN`: Token do bot que enviará as mensagens no canal ([@BotFather](https://t.me/BotFather));

`URL`: Endereços de feeds RSS separados por vírgulas. Opcionalmente, remova a variável e crie um arquivo de nome `URL.txt` com os valores;
Defina as variáveis na aba `Variables` do repositório:

`BOT_TOKEN`: Token do bot que enviará as mensagens no canal ([@BotFather](https://t.me/BotFather));
`DESTINATION`: Destinos das mensagens separados por vírgulas (`@destino` ou ID). Opcionalmente, remova a variável e crie um arquivo de nome `DESTINATION.txt` com os valores;

`URL`: Endereços de feeds RSS, separados por "enter", ou seja, um por linha. Opcionalmente, remova a variável e crie um arquivo de nome `URL.txt` com os valores;

`PARAMETERS`: (opcional) Parâmetros que serão adicionados ao fim do link;

Expand Down
2 changes: 1 addition & 1 deletion rss2telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,6 @@ def check_topics(url):
pass

if __name__ == "__main__":
for url in URL.split(','):
for url in URL.split():
check_topics(url)

0 comments on commit 216b9f8

Please sign in to comment.