diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d93fd2c7..4ecf990c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,26 @@ jobs: - TEST : debian-unstable DOCKER_IMAGE : debian:unstable steps: + - name: Setup OS + run: | + sudo apt-get update -y + sudo apt-get upgrade -y + - name: Setup Git + run: | + sudo apt-get install -y git - name: Chcekout uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: recursive + - name: work around permission issue # https://github.com/actions/checkout/issues/760#issuecomment-1097501613 + run: | + set -x + export USER=$(whoami) + git config --global --add safe.directory $GITHUB_WORKSPACE || echo "OK" # Show 'could not lock config file /github/home/.gitconfig: Permission denied', but it is ok + sudo mkdir -p /__w/ + sudo chmod 777 -R /__w/ + sudo chown -R $USER $HOME # python3_check - name: python3_check if: matrix.CHECK_PYTHON3_COMPILE == true diff --git a/.travis.sh b/.travis.sh index 514464cf..2b2b74f3 100644 --- a/.travis.sh +++ b/.travis.sh @@ -163,6 +163,7 @@ elif [ "$TEST" == "clang-tidy" ]; then run-clang-tidy -fix -p $(dirname $file) done travis_time_end + sudo chown -R $(whamoi) $CI_SOURCE_PATH git -C $CI_SOURCE_PATH --no-pager diff git -C $CI_SOURCE_PATH diff-index --quiet HEAD -- .