ci: fix profile resolution

This commit is contained in:
Zaiming (Stone) Shi 2022-06-17 23:41:37 +02:00
parent c1fdfcc2d7
commit fb54617dba
1 changed files with 15 additions and 15 deletions

View File

@ -37,8 +37,21 @@ jobs:
- name: Get profiles to build - name: Get profiles to build
id: get_profiles id: get_profiles
run: | run: |
cd source
tag=${{ github.ref }} tag=${{ github.ref }}
PROFILE=${{ github.event.inputs.profile }} # tag docker-latest-ce or docker-latest-ee
if git describe --tags --exact --match 'docker-latest-*'; then
docker_latest=true
else
docker_latest=false
fi
echo "::set-output name=IS_DOCKER_LATEST::${docker_latest}"
if git describe --tags --match "[v|e]*" --exact; then
is_exact='true'
else
is_exact='false'
fi
echo "::set-output name=IS_EXACT_TAG::${is_exact}"
case $tag in case $tag in
refs/tags/v*) refs/tags/v*)
echo "::set-output name=BUILD_PROFILES::[\"emqx\"]" echo "::set-output name=BUILD_PROFILES::[\"emqx\"]"
@ -47,6 +60,7 @@ jobs:
echo "::set-output name=BUILD_PROFILES::[\"emqx-enterprise\"]" echo "::set-output name=BUILD_PROFILES::[\"emqx-enterprise\"]"
;; ;;
*) *)
PROFILE=${{ github.event.inputs.profile }}
case "$PROFILE" in case "$PROFILE" in
emqx) emqx)
true true
@ -62,20 +76,6 @@ jobs:
echo "::set-output name=BUILD_PROFILES::[\"$PROFILE\"]" echo "::set-output name=BUILD_PROFILES::[\"$PROFILE\"]"
;; ;;
esac esac
# tag docker-latest-ce or docker-latest-ee
if git describe --tags --exact --match 'docker-latest-*'; then
docker_latest=true
else
docker_latest=false
fi
echo "::set-output name=IS_DOCKER_LATEST::${docker_latest}"
if git describe --tags --match "[v|e]*" --exact; then
is_exact='true'
else
is_exact='false'
fi
echo "::set-output name=IS_EXACT_TAG::${is_exact}"
- name: get_all_deps - name: get_all_deps
run: | run: |
make -C source deps-all make -C source deps-all