Просмотр исходного кода

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

Zaiming (Stone) Shi 3 лет назад
Родитель
Сommit
bdb370bf4e
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      .github/workflows/build_packages.yaml

+ 2 - 0
.github/workflows/build_packages.yaml

@@ -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"