tld-update #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tld-update | |
on: | |
workflow_dispatch: | |
schedule: | |
# Run once a day at 15:00 UTC | |
- cron: '0 15 * * *' | |
permissions: | |
contents: read | |
jobs: | |
psl-gtld-update: | |
name: Check for TLD data updates | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 'stable' | |
- name: Run unit tests | |
run: go test -C ./tools -v . | |
- name: Set current date | |
id: get-date | |
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S %Z')" >> $GITHUB_OUTPUT | |
- name: Run patchnewgtlds | |
run: tools/patchnewgtlds | |
- name: Create pull-request | |
id: cpr | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
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 | |
labels: | | |
✅ autopull | |
🚩ICANN (IANA/ICP-3) Section | |
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 }}" |