Daily Tor Expert Bundle Version Update #2
This file contains hidden or 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: "Daily Tor Expert Bundle Version Update" | |
| # Schedule the workflow to run every 10 minutes | |
| on: | |
| schedule: | |
| # Runs every 10th minute (e.g., at :00, :10, :20, :30, :40, :50) | |
| - cron: '*/2 * * * *' | |
| # Allows you to manually trigger the workflow from the GitHub UI | |
| workflow_dispatch: | |
| jobs: | |
| update-tor-versions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run Tor version scraper | |
| run: python main.py | |
| - name: Configure Git | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| - name: Commit and push changes | |
| run: | | |
| git add . | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "[Auto] Update Tor versions data - $(date)" | |
| git push | |
| fi |