Add env test

This commit is contained in:
Nikola Jokic
2023-12-05 14:11:12 +01:00
parent 20c8c49046
commit 82d4ab8936
11 changed files with 32 additions and 14 deletions

View File

@@ -18,6 +18,23 @@ function set_targets() {
echo $TARGETS
}
function env_test() {
if [[ -z "${GITHUB_TOKEN}" ]]; then
echo "Error: GITHUB_TOKEN is not set"
exit 1
fi
if [[ -z "${TARGET_ORG}" ]]; then
echo "Error: TARGET_ORG is not set"
exit 1
fi
if [[ -z "${TARGET_REPO}" ]]; then
echo "Error: TARGET_REPO is not set"
exit 1
fi
}
function main() {
local failed=()
@@ -53,4 +70,6 @@ function main() {
set_targets
env_test
main