commit #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }}"}}' |