Skip to content

Commit

Permalink
Add safe directory configuration (#1748)
Browse files Browse the repository at this point in the history
* add safe directory configuration

Signed-off-by: hlts2 <[email protected]>

* fix command bug

Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 authored Jul 27, 2022
1 parent c4913b4 commit 020c573
Show file tree
Hide file tree
Showing 32 changed files with 171 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 10
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Fetch golang version
run: |
GO_VERSION=`make version/go`
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/chatops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ jobs:
if: steps.check_comments_changelog.outputs.BOOL_TRIGGERED == 'true' && steps.check_permissions.outputs.EXECUTABLE == 'true'
with:
fetch-depth: 0
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: comment to PR
if: steps.check_comments_changelog.outputs.BOOL_TRIGGERED == 'true' && steps.check_permissions.outputs.EXECUTABLE == 'true'
run: |
Expand Down Expand Up @@ -199,6 +202,9 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.DISPATCH_TOKEN }}
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Automatic Rebase
if: steps.check_comments_rebase.outputs.BOOL_TRIGGERED == 'true' && steps.check_permissions.outputs.EXECUTABLE == 'true'
uses: cirrus-actions/[email protected]
Expand Down Expand Up @@ -275,6 +281,9 @@ jobs:
if: steps.check_comments_gen_test.outputs.BOOL_TRIGGERED == 'true' && steps.check_permissions.outputs.EXECUTABLE == 'true'
with:
fetch-depth: 0
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- uses: crazy-max/ghaction-import-gpg@v4
if: steps.check_comments_gen_test.outputs.BOOL_TRIGGERED == 'true' && steps.check_permissions.outputs.EXECUTABLE == 'true'
with:
Expand Down Expand Up @@ -385,6 +394,9 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.DISPATCH_TOKEN }}
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- uses: crazy-max/ghaction-import-gpg@v4
if: steps.check_comments_format.outputs.BOOL_TRIGGERED == 'true' && steps.check_permissions.outputs.EXECUTABLE == 'true'
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Install dependencies
run: |
sudo apt-get update && \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Run coverage
continue-on-error: true
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-agent-ngt-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-agent-sidecar-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-ci-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-dev-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-discoverer-k8s-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-gateway-filter-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-gateway-lb-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-helm-operator-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/dockers-image-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the Docker image
id: build_image
run: |
Expand Down Expand Up @@ -53,6 +56,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the Docker image
id: build_image
run: |
Expand Down Expand Up @@ -83,6 +89,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the Docker image
id: build_image
run: |
Expand Down Expand Up @@ -113,6 +122,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the Docker image
id: build_image
run: |
Expand Down Expand Up @@ -143,6 +155,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the Docker image
id: build_image
run: |
Expand Down Expand Up @@ -173,6 +188,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the Docker image
id: build_image
run: |
Expand Down Expand Up @@ -203,6 +221,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the Docker image
id: build_image
run: |
Expand Down Expand Up @@ -233,6 +254,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the Docker image
id: build_image
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-loadtest-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:
max-parallel: 4
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dockers-manager-index-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/e2e-chaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-chaos'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down Expand Up @@ -124,6 +127,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-chaos'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down Expand Up @@ -215,6 +221,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-chaos'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down Expand Up @@ -306,6 +315,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-chaos'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-code-bench-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ jobs:
steps:
- name: Check out code.
uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Run grpc-stream
run: |
make hack/benchmark/assets/dataset/${DATASET}
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/e2e-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-deploy'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down Expand Up @@ -121,6 +124,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-deploy'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down Expand Up @@ -218,6 +224,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-deploy'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down Expand Up @@ -302,6 +311,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-deploy'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down Expand Up @@ -383,6 +395,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-deploy'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-max-dim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-max-dim'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-profiling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-profiling'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Wait for Docker images
if: startsWith( github.ref, 'refs/tags/')
id: wait_for_docker_images
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.DISPATCH_TOKEN }}
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
if: github.ref == 'refs/heads/master' || github.event.action == 'labeled' && github.event.label.name == 'actions/fossa'
steps:
- uses: actions/checkout@v3
- name: set git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: "Install fossa-cli"
run: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
Expand Down
Loading

0 comments on commit 020c573

Please sign in to comment.