ci: make sure detect-profile works in source dir

This commit is contained in:
Zaiming (Stone) Shi 2022-11-03 14:36:37 +01:00
parent 5bba281c2b
commit c6efd902f8
1 changed files with 9 additions and 1 deletions

View File

@ -15,7 +15,15 @@ runs:
shell: bash
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if make emqx-ee --dry-run > /dev/null 2>&1; then
if [ -d source ]; then
## source code downloaded
cd source
fi
if [ ! -d .git ]; then
echo "Not git dir, $(pwd)"
exit 1
fi
if [ -f 'EMQX_ENTERPRISE' ]; then
echo "::set-output name=profiles::[\"emqx-ee\"]"
echo "https://ci%40emqx.io:${{ inputs.ci_git_token }}@github.com" > $HOME/.git-credentials
git config --global credential.helper store