name: All RU Networks and ASN updater

env:
  GH_PAT: ${{ secrets.GH_PAT }}
  REPO_NAME: AS_Network_List
  REPO_OWNER: C24Be

on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 1 * *'

jobs:
  get_lists:
    name: 'Get/Lists'

    runs-on: ubuntu-22.04

    defaults:
      run:
        shell: bash

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0                         # this is required to fetch all history for all branches and tags
          token: ${{ env.GH_PAT }}
      - uses: ./.github/actions/pyInstall
      - run: ./get_info_from_ripe.py
      - uses: ./.github/actions/gitPush
        env:
          PUSH_FILES: auto/*txt
          CUSTOM_BRANCH: true
