From 2cb99c0824bde0f7d0989eaf5a375a2436e4c156 Mon Sep 17 00:00:00 2001 From: Be Date: Sun, 3 Mar 2024 12:25:10 +0100 Subject: [PATCH] actions --- .github/actions/gitReset/action.yaml | 9 +++++++++ .github/workflows/update_ru_all_lists.yml | 15 +++------------ 2 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 .github/actions/gitReset/action.yaml diff --git a/.github/actions/gitReset/action.yaml b/.github/actions/gitReset/action.yaml new file mode 100644 index 0000000..b6da2fd --- /dev/null +++ b/.github/actions/gitReset/action.yaml @@ -0,0 +1,9 @@ +runs: + using: "composite" + steps: + - name: Git reset, clean, pull + shell: bash + run: | + git reset --hard + git clean -fdx + git pull diff --git a/.github/workflows/update_ru_all_lists.yml b/.github/workflows/update_ru_all_lists.yml index 02f37e7..1c730b3 100644 --- a/.github/workflows/update_ru_all_lists.yml +++ b/.github/workflows/update_ru_all_lists.yml @@ -26,10 +26,7 @@ jobs: fetch-depth: 0 # this is required to fetch all history for all branches and tags token: ${{ env.GH_PAT }} ref: ${{ github.branch }} - - run: | - git reset --hard - git clean -fdx - git pull + - uses: ./.github/actions/gitReset - uses: ./.github/actions/pyInstall - run: ./get_info_from_ripe.py --asn --limit 10 - uses: ./.github/actions/gitPush @@ -53,10 +50,7 @@ jobs: fetch-depth: 0 # this is required to fetch all history for all branches and tags token: ${{ env.GH_PAT }} ref: ${{ github.branch }} - - run: | - git reset --hard - git clean -fdx - git pull + - uses: ./.github/actions/gitReset - uses: ./.github/actions/pyInstall - run: ./get_info_from_ripe.py --ipv4 --limit 10 - uses: ./.github/actions/gitPush @@ -80,10 +74,7 @@ jobs: fetch-depth: 0 # this is required to fetch all history for all branches and tags token: ${{ env.GH_PAT }} ref: ${{ github.branch }} - - run: | - git reset --hard - git clean -fdx - git pull + - uses: ./.github/actions/gitReset - uses: ./.github/actions/pyInstall - run: ./get_info_from_ripe.py --ipv6 --limit 10 - uses: ./.github/actions/gitPush