diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 342e7eb7..f4803803 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,8 +71,8 @@ jobs: # docker tags to use in matrix build git_version: [latest, 2.30.2, 2.23.0, 2.19.2] runs-on: ubuntu-latest - container: - image: bitnami/git:${{ matrix.git_version }} + env: + GIT_IMAGE: ${{ matrix.git_version == 'latest' && 'bitnami/git:latest' || format('bitnamilegacy/git:{0}', matrix.git_version) }} steps: - uses: actions/checkout@v2 @@ -80,12 +80,19 @@ jobs: - name: Run setup scripts with Bash shell: bash run: | - git config --global --add safe.directory /__w/git-katas/git-katas - git --version - git config --global user.name "GitHub Actions" - git config --global user.email "nobody@localhost" - chmod +x ./test-all.sh - ./test-all.sh + docker run --rm \ + --volume "$GITHUB_WORKSPACE:/workspace" \ + --workdir /workspace \ + --env HOME=/tmp \ + --entrypoint bash \ + "$GIT_IMAGE" -c ' + git config --global --add safe.directory /workspace + git --version + git config --global user.name "GitHub Actions" + git config --global user.email "nobody@localhost" + chmod +x ./test-all.sh + ./test-all.sh + ' # job will succeed if all matrix builds succeed, # used a toll gate to merge pr, without having