mirror of
https://github.com/BillyOutlast/posthog.git
synced 2026-02-04 03:01:23 +01:00
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
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_GITHUB_TOKEN }}
|
|
fetch-depth: 0
|
|
|
|
- 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.GITHUB_TOKEN }}
|
|
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-messaging
|