This commit is contained in:
Marc Beninca 2024-05-03 13:06:52 +02:00
parent 62690422f5
commit a102db152b
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

7
cd.sh
View file

@ -75,20 +75,21 @@ local variable
;;
*) cd_error_os "CD_OS_ID" ;;
esac
# ci / github
# continuous integration platform
if [ "${GITHUB_ACTIONS}" ] ; then
# forgejo / gitea / github
CD_SERVER_URL="${GITHUB_SERVER_URL}"
CD_PROJECTS_GROUP="$(dirname "${GITHUB_REPOSITORY}")"
CD_PROJECT_NAME="$(basename "${GITHUB_REPOSITORY}")"
CD_PROJECT_BRANCH="${GITHUB_REF_NAME}"
# ci / gitlab
elif [ "${GITLAB_CI}" ] ; then
# gitlab
CD_SERVER_URL="${CI_SERVER_URL}"
CD_PROJECTS_GROUP="$(dirname "${CI_PROJECT_PATH}")"
CD_PROJECT_NAME="$(basename "${CI_PROJECT_PATH}")"
CD_PROJECT_BRANCH="${CI_COMMIT_BRANCH}"
# ci / none
else
# unsupported
cd_error_ci "ø"
fi
#