-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger osc-sdk-python auto-build on release
Signed-off-by: Jérôme Jutteau <[email protected]>
- Loading branch information
1 parent
87c5e83
commit d57f92f
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ -z "$API_VERSION" ]; then | ||
echo "API_VERSION is missing, abort" | ||
echo "pass API_VERSION through environment variable" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$GH_TOKEN" ]; then | ||
echo "GH_TOKEN is missing, abort." | ||
echo "pass GH_TOKEN through environment variable" | ||
exit 1 | ||
fi | ||
|
||
ghurl="https://api.github.com" | ||
data="{\"ref\": \"master\", \"inputs\": {\"api_version\": \"$API_VERSION\"}" | ||
curl \ | ||
-X POST \ | ||
-H "Authorization: token $GH_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-d "${data}" \ | ||
"${ghurl}/repos/outscale/osc-sdk-python/actions/workflows/build.yml/dispatches" |
This file contains 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