update output.txt, date: Sun 22 Sep 19:20:41 BST 2024 #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Send V2Ray Links to Telegram | |
# Trigger the workflow on push or pull request whenever a file changes | |
on: | |
push: | |
paths: | |
- 'data/output.txt' # Specify the paths to monitor for changes, e.g., all text files | |
pull_request: | |
paths: | |
- 'data/output.txt' | |
workflow_dispatch: | |
jobs: | |
send-links: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Set up environment variables (either hardcode them or use secrets) | |
- name: Set up environment | |
run: | | |
echo "API_TOKEN=${{ secrets.TELEGRAM_BOT_API_TOKEN }}" >> .env | |
echo "CHAT_ID=${{ secrets.TELEGRAM_CHAT_ID }}" >> .env | |
echo "FILE=data/output.txt" >> .env # Update to your actual output file if needed | |
# Run the script | |
- name: Send V2Ray Links to Telegram | |
run: | | |
chmod +x broadcast.sh | |
./broadcast.sh |