Update Bot IPs #104
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: Update Bot IPs | |
| on: | |
| schedule: | |
| # Run daily at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: # Allow manual triggering | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| update-bot-ips: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.POSTHOG_BOT_PAT }} | |
| - name: Run update script | |
| run: | | |
| ./bin/update-bots-list | |
| - name: Check for changes | |
| id: check-changes | |
| run: | | |
| if git diff --quiet plugin-server/assets/bot-ips.txt; then | |
| echo "changes=false" >> $GITHUB_OUTPUT | |
| echo "No changes detected in bot IPs" | |
| else | |
| echo "changes=true" >> $GITHUB_OUTPUT | |
| echo "Changes detected in bot IPs" | |
| git diff --stat plugin-server/assets/bot-ips.txt | |
| fi | |
| - name: Create Pull Request | |
| if: steps.check-changes.outputs.changes == 'true' | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v5 | |
| with: | |
| token: ${{ secrets.POSTHOG_BOT_PAT }} | |
| commit-message: 'Update bot IPs from GoodBots repository' | |
| title: '🤖 Update bot IPs from GoodBots repository' | |
| body: | | |
| This PR updates the bot IPs list from the [GoodBots repository](https://github.com/AnTheMaker/GoodBots). | |
| **Changes:** | |
| - Updated `plugin-server/assets/bot-ips.txt` with latest bot IPs | |
| **Source:** https://raw.githubusercontent.com/AnTheMaker/GoodBots/main/all.ips | |
| This is an automated update that runs daily. | |
| base: master | |
| delete-branch: true | |
| labels: | | |
| automated | |
| bot-ips | |
| dependencies | |
| reviewers: | | |
| PostHog/team-workflows |