diff --git a/.changelog/3e80c9a9167b4d0ea3eb95f8b46b177a.md b/.changelog/3e80c9a9167b4d0ea3eb95f8b46b177a.md new file mode 100644 index 0000000..c637a10 --- /dev/null +++ b/.changelog/3e80c9a9167b4d0ea3eb95f8b46b177a.md @@ -0,0 +1,4 @@ +--- +type: none +--- +Fixes for geo-data.py action \ No newline at end of file diff --git a/.changelog/72ba948357fb41ea948a25b8c8454131.md b/.changelog/72ba948357fb41ea948a25b8c8454131.md new file mode 100644 index 0000000..2e83193 --- /dev/null +++ b/.changelog/72ba948357fb41ea948a25b8c8454131.md @@ -0,0 +1,4 @@ +--- +type: none +--- +Cron action for geo-data.py \ No newline at end of file diff --git a/.changelog/c981d53176e142ba94d885a13e608faa.md b/.changelog/c981d53176e142ba94d885a13e608faa.md new file mode 100644 index 0000000..67d5bb5 --- /dev/null +++ b/.changelog/c981d53176e142ba94d885a13e608faa.md @@ -0,0 +1,4 @@ +--- +type: minor +--- +Update geo-data, Türkiye \ No newline at end of file diff --git a/.github/workflows/geo-data.yml b/.github/workflows/geo-data.yml new file mode 100644 index 0000000..a1249ec --- /dev/null +++ b/.github/workflows/geo-data.yml @@ -0,0 +1,51 @@ +name: Update geo_data.py +on: + workflow_dispatch: # option to run manually if/when needed + schedule: + - cron: "42 3 * * 6" # sat @ 3:42am + +jobs: + config: + runs-on: ubuntu-latest + outputs: + json: ${{ steps.load.outputs.json }} + steps: + - uses: actions/checkout@v4 + - id: load + # based on https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings + run: | + { + echo 'json<> $GITHUB_OUTPUT + update-geo-data: + needs: config + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ fromJson(needs.config.outputs.json).python_version_current }} + architecture: x64 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install virtualenv + - name: Generate geo_data.py + run: | + ./script/bootstrap + source env/bin/activate + ./script/generate-geo-data > octodns/record/geo_data.py + git diff + [ `git status --porcelain=1 | wc -l` -ne 0 ] && ./script/changelog create -t minor Periodic updates to geo_data.py || true + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v7 + with: + commit-message: Periodic updates to geo_data.py + branch: update-geo-data + title: Update geo_data.py to reflect recent changes + body: Auto-generated with https://github.com/peter-evans/create-pull-request diff --git a/octodns/record/geo_data.py b/octodns/record/geo_data.py index d78eabf..dfbe75f 100644 --- a/octodns/record/geo_data.py +++ b/octodns/record/geo_data.py @@ -123,7 +123,7 @@ geo_data = { 'TJ': {'name': 'Tajikistan'}, 'TL': {'name': 'Timor-Leste'}, 'TM': {'name': 'Turkmenistan'}, - 'TR': {'name': 'Turkey'}, + 'TR': {'name': 'Türkiye'}, 'TW': {'name': 'Taiwan, Province of China'}, 'UZ': {'name': 'Uzbekistan'}, 'VN': {'name': 'Viet Nam'},