File: trigger.sh

package info (click to toggle)
roc-toolkit 0.4.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,684 kB
  • sloc: cpp: 102,987; ansic: 8,959; python: 6,125; sh: 942; makefile: 16; javascript: 9
file content (12 lines) | stat: -rwxr-xr-x 323 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash
set -euxo pipefail

repo="$1"
branch="$2"
token="$3"

curl -s -X POST \
     "https://api.github.com/repos/${repo}/dispatches" \
     -H 'Accept: application/vnd.github.everest-preview+json' \
     -u "${token}" \
     --data '{"event_type": "Trigger", "client_payload": { "branch": "'"${branch}"'" }}'