RU/Updater

This commit is contained in:
Be
2024-03-03 09:56:17 +01:00
parent be298e0576
commit ab3634412b
5 changed files with 6125 additions and 6113 deletions

View File

@@ -11,7 +11,7 @@ on:
- cron: '0 6 * * *' - cron: '0 6 * * *'
jobs: jobs:
build: update:
name: 'Update' name: 'Update'
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04

View File

@@ -8,11 +8,14 @@ env:
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: '0 0,2,4 1 * *' - cron: '0 0 1 * *'
push:
branches:
- main
jobs: jobs:
build: get_as:
name: 'Update' name: 'Get/ASN'
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
@@ -21,23 +24,32 @@ jobs:
shell: bash shell: bash
steps: steps:
- uses: actions/checkout@v4 - run: curl -s ifconfig.io
with:
fetch-depth: 0 # this is required to fetch all history for all branches and tags get_ipv4:
token: ${{ env.GH_PAT }} name: 'Get/IPv4'
- uses: actions/setup-python@v5
with: runs-on: ubuntu-22.04
python-version: '3.12'
- run: ./requirements.sh defaults:
- run: | run:
hour=$(date +%H) shell: bash
if (( 0 <= 10#$hour && 10#$hour < 1 )); then
./get_info_from_ripe.py --asn needs: get_as
elif (( 2 <= 10#$hour && 10#$hour < 3 )); then
./get_info_from_ripe.py --ipv4 steps:
else - run: curl -s ifconfig.io
./get_info_from_ripe.py --ipv6
fi get_ipv6:
- uses: ./.github/actions/gitPush name: 'Get/IPv6'
env:
PUSH_FILES: auto/all-ru-*txt runs-on: ubuntu-22.04
defaults:
run:
shell: bash
needs: get_ipv4
steps:
- run: curl -s ifconfig.io

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff