-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (32 loc) · 1.19 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Update Validation Patterns
on:
schedule:
- cron: "0 0 * * 0"
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v3
- name: Fetch third-party metadata
run: |
curl -o resources/metadata.xml https://raw.githubusercontent.com/google/libphonenumber/master/resources/PhoneNumberMetadata.xml
- name: Update metadata
run: |
python scripts/prepare-metadata
- name: Compare metadata
id: compare
run: |
git diff --exit-code resources/metadata.xml || echo "::set-output name=differs::true"
- name: Create Pull Request
if: steps.compare.outputs.differs == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_TOKEN }}
branch-suffix: short-commit-hash
branch: update-validation-patterns
title: Update the validation patterns
commit-message: Update the validation patterns
body: This PR updates the validation patterns i.e. metadata.xml to keep the repository up-to-date with the upstream changes.