name: Update Public Suffix List
on:
schedule:
# Run monthly on the 1st at 02:00 UTC
- cron: '0 2 1 * *'
workflow_dispatch:
# Allow manual trigger
permissions:
contents: write
pull-requests: write
jobs:
update:
name: Update PSL
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: intl, json, curl
coverage: none
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run update script
run: ./bin/update-psl --verbose
- name: Check for changes
id: changes
run: |
if git diff --quiet src/Resources/public_suffix_list.dat; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: steps.changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: update public suffix list'
title: 'chore: update public suffix list'
body: |
Automated update of the bundled Public Suffix List.
Source: https://publicsuffix.org/list/public_suffix_list.dat
This PR was auto-generated by the monthly update workflow.
branch: update-psl
delete-branch: true
labels: |
automated
dependencies
|