8000 chore: 워커 호출량 그래프 자동 갱신 · hmmhmmhm/daiso-mcp@c32aad0 · GitHub
[go: up one dir, main page]

Skip to content

Workers Invocations Chart #190

Workers Invocations Chart

Workers Invocations Chart #190

name: Workers Invocations Chart
on:
schedule:
# 한국시간 00:20 = UTC 15:20 (전날)
- cron: '20 15 * * *'
workflow_dispatch:
inputs:
worker_script_name:
description: 'Cloudflare Workers 스크립트 이름'
required: false
default: 'daiso-mcp'
days:
description: '그래프 기간(일)'
required: false
default: '30'
start_date:
description: '그래프 시작일(YYYY-MM-DD). 비우면 days 기준 최근 기간을 사용'
required: false
default: ''
permissions:
contents: write
concurrency:
group: workers-invocations-chart-${{ github.ref }}
cancel-in-progress: false
jobs:
update-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '24'
cache: npm
- name: Sync latest main
run: git pull --ff-only origin main
- name: Install Korean fonts
run: |
sudo apt-get update
sudo apt-get install -y fonts-noto-cjk fonts-nanum
- name: Install dependencies
run: npm ci
- name: Update workers invocations chart
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_GLOBAL_API_KEY: ${{ secrets.CLOUDFLARE_GLOBAL_API_KEY }}
CLOUDFLARE_ZONE_ID: ${{ vars.CLOUDFLARE_ZONE_ID || 'c987d32286724a5a1fd5586cec7756c1' }}
CF_WORKER_SCRIPT_NAME: ${{ inputs.worker_script_name || vars.CF_WORKER_SCRIPT_NAME || 'daiso-mcp' }}
WORKERS_CHART_DAYS: ${{ inputs.days || '30' }}
WORKERS_CHART_START_DATE: ${{ inputs.start_date || vars.WORKERS_CHART_START_DATE || '' }}
WORKERS_CHART_CONCURRENCY: ${{ vars.WORKERS_CHART_CONCURRENCY || '4' }}
WORKERS_CHART_ROOT_REQUESTS_RETENTION_DAYS: ${{ vars.WORKERS_CHART_ROOT_REQUESTS_RETENTION_DAYS || '7' }}
WORKERS_CHART_ROOT_REDIRECT_START: ${{ vars.WORKERS_CHART_ROOT_REDIRECT_START || '2026-05-27T07:24:50.000Z' }}
run: npm run update:workers-chart
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add README.md assets/analytics/workers-invocations.json assets/analytics/workers-invocations.png
if git diff --cached --quiet; then
echo "No chart changes to commit"
exit 0
fi
git commit -m "chore: 워커 호출량 그래프 자동 갱신"
git pull --rebase --autostash origin main
git push origin HEAD:main
0