From 6a6c5c05cba9830f03c9fda86af1da7d673c48c1 Mon Sep 17 00:00:00 2001 From: Be Date: Sun, 3 Mar 2024 19:28:17 +0100 Subject: [PATCH] branches --- .github/actions/gitReset/action.yaml | 8 ++++++++ .github/workflows/resolve_networks.yml | 11 ++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/actions/gitReset/action.yaml b/.github/actions/gitReset/action.yaml index b6da2fd..8f0379e 100644 --- a/.github/actions/gitReset/action.yaml +++ b/.github/actions/gitReset/action.yaml @@ -4,6 +4,14 @@ runs: - name: Git reset, clean, pull shell: bash run: | + daily_branch=`date "+%Y%m%d"` + if [ -n "${{ env.CUSTOM_BRANCH }}" ]; then + git reset --hard + git clean -fdx + git checkout "${daily_branch}" + git pull origin "${daily_branch}" + git push --set origin "${daily_branch}" + fi git reset --hard git clean -fdx git pull diff --git a/.github/workflows/resolve_networks.yml b/.github/workflows/resolve_networks.yml index 737da65..ec916b9 100644 --- a/.github/workflows/resolve_networks.yml +++ b/.github/workflows/resolve_networks.yml @@ -4,7 +4,7 @@ env: GH_PAT: ${{ secrets.GH_PAT }} REPO_NAME: AS_Network_List REPO_OWNER: C24Be - WHOIS_RESOLVE_LIMIT: 3000 + WHOIS_RESOLVE_LIMIT: 10 on: workflow_dispatch: @@ -28,11 +28,14 @@ jobs: token: ${{ env.GH_PAT }} ref: ${{ github.branch }} - uses: ./.github/actions/gitReset + env: + CUSTOM_BRANCH: true - uses: ./.github/actions/pyInstall - run: ./get_description.py auto/all-ru-asn.txt --limit ${{ env.WHOIS_RESOLVE_LIMIT }} - uses: ./.github/actions/gitPush env: PUSH_FILES: auto/*txt + CUSTOM_BRANCH: true resolve_ipv4: name: 'Resolve/IPv4' @@ -52,11 +55,14 @@ jobs: token: ${{ env.GH_PAT }} ref: ${{ github.branch }} - uses: ./.github/actions/gitReset + env: + CUSTOM_BRANCH: true - uses: ./.github/actions/pyInstall - run: ./get_description.py auto/all-ru-ipv4.txt --limit ${{ env.WHOIS_RESOLVE_LIMIT }} - uses: ./.github/actions/gitPush env: PUSH_FILES: auto/*txt + CUSTOM_BRANCH: true resolve_ipv6: name: 'Resolve/IPv6' @@ -76,8 +82,11 @@ jobs: token: ${{ env.GH_PAT }} ref: ${{ github.branch }} - uses: ./.github/actions/gitReset + env: + CUSTOM_BRANCH: true - uses: ./.github/actions/pyInstall - run: ./get_description.py auto/all-ru-ipv6.txt --limit ${{ env.WHOIS_RESOLVE_LIMIT }} - uses: ./.github/actions/gitPush env: PUSH_FILES: auto/*txt + CUSTOM_BRANCH: true