Skip to content

commit

commit #3

Workflow file for this run

name: Notify chart updater
# このリポジトリへの push を hrmcngs/hrmc.ngs.computer にディスパッチして
# チャート再生成を即時トリガーする。
on:
push:
branches: [main, master]
workflow_dispatch:
permissions: {}
concurrency:
group: notify-charts
cancel-in-progress: true
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Dispatch chart update
env:
TOKEN: ${{ secrets.CHARTS_TRIGGER_TOKEN }}
run: |
if [ -z "$TOKEN" ]; then
echo "CHARTS_TRIGGER_TOKEN が未設定のためスキップ"
exit 0
fi
curl -fsSL -X POST -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hrmcngs/hrmc.ngs.computer/dispatches -d '{"event_type":"user-commit","client_payload":{"repo":"${{ github.repository }}","sha":"${{ github.sha }}"}}'