Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

download_ranges

download_ranges #405

Workflow file for this run

name: download_ranges
# Controls when the workflow will run
on:
schedule:
- cron: "0 0 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Create local changes
run: |
wget -O ranges_nuclei.txt https://cdn.nuclei.sh/
curl -k -s --data "resp_format=json" https://my.imperva.com/api/integration/v1/ips | jq '[.["Imperva"] = .ipRanges | .["ImpervaIPv6"] = .ipv6Ranges | del(.ipRanges, .ipv6Ranges,.res,.res_message,.debug_info)]' | jq -r .[] > imperva.txt
jq -s '.[0] * .[1]' ranges_nuclei.txt imperva.txt > ranges.txt
- name: Commit files
run: |
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git config --local user.name 'github-actions[bot]'
git add -A ranges.txt
git commit -m "CDN ip ranges daily push from cdn.nuclei.sh" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.API_TOKEN_GITHUB }}
branch: ${{ github.ref }}