Skip to content

Commit

Permalink
update trigger script
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaminsk committed Apr 23, 2021
1 parent cd5cae1 commit 352b42a
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions .github/trigger.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/bash

dev_branch=wip

function list() {
curl \
-X GET \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/potassco/clingcon/actions/workflows" \
-d "{\"ref\":\"${dev_branch}\"}"
-d "{\"ref\":\"ref\"}"
}

function dispatch() {
Expand All @@ -17,29 +15,42 @@ function dispatch() {
-X POST \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/potassco/clingcon/actions/workflows/$1/dispatches" \
-d "{\"ref\":\"${dev_branch}\"}"
-d "{\"ref\":\"$3\",\"inputs\":{\"wip\":\"$2\"${4:+,$4}}}"
}

branch=wip
wip=true

case $1 in
list)
list
;;
release)
if [[ $# < 2 ]]; then
echo "usage: trigger release REF"
exit 1
fi
wip=false
branch=$2
# .github/workflows/manylinux.yml
# can be enabled once we switch to the debian based manylinux images
#dispatch 5239780 $wip $branch '"image":"manylinux2014_ppc64le"'
dispatch 5239780 $wip $branch '"image":"manylinux2014_aarch64"'
;&
dev)
# .github/workflows/conda-dev.yml
dispatch 5239781
dispatch 5239781 $wip $branch
# .github/workflows/manylinux.yml
dispatch 5239780
# .github/workflows/pipsource.yml
dispatch 5239782
dispatch 5239780 $wip $branch
#.github/workflows/pipsource.yml
dispatch 5239782 $wip $branch
# .github/workflows/pipwinmac-wip.yml
dispatch 5239783
dispatch 5239783 $wip $branch
# .github/workflows/ppa-dev.yml
dispatch 5245822
;;
release)
echo "implement me"
dispatch 5245822 $wip $branch
;;
*)
echo "usage: trigger {list,dev,release}"
exit 1
;;
esac

0 comments on commit 352b42a

Please sign in to comment.