ci
This commit is contained in:
parent
62690422f5
commit
a102db152b
1 changed files with 4 additions and 3 deletions
7
cd.sh
7
cd.sh
|
@ -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
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue