From 317a4c48f058755019475de79896230dadc6474c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 23 Aug 2023 21:18:53 +0100 Subject: [PATCH] ci: Move `git config ...` to `run-in-docker-action` --- .github/actions/run-in-docker-action/action.yml | 5 ++++- .github/workflows/ci.yml | 11 ----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/actions/run-in-docker-action/action.yml b/.github/actions/run-in-docker-action/action.yml index 79cf9d623313c..30e83ff295968 100644 --- a/.github/actions/run-in-docker-action/action.yml +++ b/.github/actions/run-in-docker-action/action.yml @@ -41,5 +41,8 @@ runs: $(echo '${{ toJSON(env) }}' | jq -r 'keys[] | "--env \(.) "') \ --volume ${{ github.workspace }}:${{ github.workspace }} \ --workdir ${{ github.workspace }} \ - ${{ inputs.tag }} bash -c "${{ inputs.command }}" + ${{ inputs.tag }} bash -c " + git config --global --add safe.directory ${{ github.workspace }} + ${{ inputs.command }} + " shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1307b99c75b2..35b0ca0c8859f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,7 +105,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -156,7 +155,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -203,7 +201,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -258,7 +255,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -305,7 +301,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -352,7 +347,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -409,7 +403,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -467,7 +460,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -526,7 +518,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -583,7 +574,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true @@ -747,7 +737,6 @@ jobs: dockerfile: ./ci/linux-debian.Dockerfile tag: linux-debian-image command: > - git config --global --add safe.directory ${{ github.workspace }} && ./ci/ci.sh - run: cat tests.log || true