Skip to content

gen-traffic

gen-traffic #9560

Workflow file for this run

name: gen-traffic
on:
workflow_dispatch: {}
schedule:
# https://crontab.guru/examples.html
- cron: "*/5 * * * *" # every 5 minutes
jobs:
gen-traffic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: generate traffic
env:
HOST: ${{ secrets.HOST }}
run: |
N=$(shuf -i 1-100 -n 1)
echo "Making ${N} random requests"
grep -v '^#' urls.txt | shuf -n ${N} | envsubst | xargs -t -I {} bash -c "curl {} -o /dev/null; sleep 1;" || true