ci: ensure git safe dir for cross-build prepare stage

This commit is contained in:
Zaiming (Stone) Shi 2022-07-01 06:17:51 +02:00
parent 8a9b0649e7
commit bdb370bf4e
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ on:
jobs: jobs:
prepare: prepare:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-ubuntu20.04
outputs: outputs:
BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }} BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }}
IS_EXACT_TAG: ${{ steps.get_profile.outputs.IS_EXACT_TAG }} IS_EXACT_TAG: ${{ steps.get_profile.outputs.IS_EXACT_TAG }}
@ -38,6 +39,7 @@ jobs:
id: get_profile id: get_profile
run: | run: |
cd source cd source
git config --global --add safe.directory "$(pwd)"
tag=${{ github.ref }} tag=${{ github.ref }}
if git describe --tags --match "[v|e]*" --exact; then if git describe --tags --match "[v|e]*" --exact; then
echo "This is an exact git tag, will publish release" echo "This is an exact git tag, will publish release"