Skip to content

Daily Website Request #26

Daily Website Request

Daily Website Request #26

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Daily Website Request
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
# 执行时间,北京时间上午10点执行,可根据情况修改。
- cron: '0 2 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
debug_enabled:
description: "手动触发"
required: true
default: true
jobs:
request:
runs-on: ubuntu-latest
env:
# 在这里配置你的地址列表,逗号分隔
URLS: ${{ vars.URLS}}
steps:
- name: Validate URLS
run: |
if [ -z "$URLS" ]; then
echo "❌ ERROR: URLS is empty. Please configure vars.URLS in repository settings."
exit 1
fi
- name: Curl request to multiple URLs
run: |
IFS=',' read -ra ADDR <<< "$URLS"
for url in "${ADDR[@]}"; do
echo "Requesting $url ..."
# default GET Request
curl -X GET -I --retry 3 --max-time 30 "$url"
echo ""
sleep 1
done