frostfs-locode-db/.forgejo/workflows/updatechecker.yml
George Bartolomey 3feec01b21
[#6] Add automated database updater
A small parser of unece.org "Trade code download page" added to Makefile to fetch last
database's URL to download. Also, the forgejo action added. Action runs every
month to update databases and send PR to Forgejo.

Signed-off-by: George Bartolomey <george@bh4.ru>
2024-07-04 14:33:03 +03:00

17 lines
675 B
YAML

on:
schedule:
- cron: "2 0 1 * *"
jobs:
checkupdates:
runs-on: docker
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- run: make update
- run: |
git config user.name "Snegurochka"
git config user.email "snegurochka@frostfs.info"
git switch -c update-dbs
git add .
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@git.frostfs.info/TrueCloudLab/frostfs-locode-db
git commit -m "Automatic database update (UN/LOCODE version $(cat tmp/locode-version.txt))" && \
git push origin HEAD:refs/for/master -o topic=automatic-database-update