mirror of
https://github.com/Respect/Validation.git
synced 2026-03-22 17:54:41 +01:00
It makes more sense to use PHP to generate PHP code than to use Bash. I love writing Bash scripts, but I know it's not for everyone, and they can become quite complex. Porting them to PHP code also lowers the barrier for people to change them. While I was making those changes, I also noticed a problem with how we save the domain suffixes. We're converting all of them to ASCII, so we are not preserving languages such as Chinese, Thai, and Hebrew, which use non-ASCII characters.
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Update Regional Information
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
update-regional-information:
|
|
name: Update Regional Information
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Install xmlstarlet
|
|
run: sudo apt install xmlstarlet idn2
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ secrets.LAST_MINOR_VERSION }}
|
|
|
|
- name: Update top level domains
|
|
run: bin/console update:domain-toplevel
|
|
|
|
- name: Update public domain suffixes
|
|
run: bin/console update:domain-suffixes
|
|
|
|
- name: Update postal codes
|
|
run: bin/console update:postal-codes
|
|
|
|
- name: Create pull request
|
|
id: cpr
|
|
uses: peter-evans/create-pull-request@v8
|
|
with:
|
|
committer: The Respect Panda <therespectpanda@gmail.com>
|
|
author: The Respect Panda <therespectpanda@gmail.com>
|
|
commit-message: Update Regional Information
|
|
title: Update Regional Information
|
|
base: ${{ secrets.LAST_MINOR_VERSION }}
|
|
branch: "workflows/update-regional-information"
|
|
|
|
- name: Enable auto-merge for PR
|
|
if: steps.cpr.outputs.pull-request-number
|
|
uses: peter-evans/enable-pull-request-automerge@v3
|
|
with:
|
|
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
|
|
merge-method: rebase
|