blob: a7ebfa97d0f9752e1d48b822f5fd7e1b799454c8 [file] [log] [blame]
# Put this automation on hold, until it is able to ignore changes that only update the header timestamp.
name: tld-update
on:
schedule:
# Run once a day at 15:00 UTC
- cron: '0 15 * * *'
jobs:
psl-gtld-update:
name: Check for TLD data updates
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.15
- name: Run unit tests
run: go test tools/*.go
- name: Set current date
id: get-date
run: echo "::set-output name=now::$(date +'%Y-%m-%dT%H:%M:%S %Z')"
- name: Run patchnewgtlds
run: tools/patchnewgtlds
- name: Create pull-request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: "${{ secrets.BOT_PAT }}"
push-to-fork: tld-update-bot/list
commit-message: "util: gTLD data autopull updates for ${{ steps.get-date.outputs.now }}"
title: "util: gTLD autopull updates for ${{ steps.get-date.outputs.now }}"
body: "Public suffix list gTLD data updates from `tools/patchnewgtlds` for ${{ steps.get-date.outputs.now }}."
committer: "GitHub <noreply@github.com>"
author: "GitHub <noreply@github.com>"
branch: psl-gtld-update
delete-branch: true
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"