Skip to content

Commit 383f599

Browse files
committed
ci(pipeline): configure safe directory for Git commands
- Adds configuration to set the Git safe directory, allowing Git commands to safely run in the GitHub workspace. - Enhances security and prevents potential issues while executing Git commands in the CI pipeline.
1 parent 6413f7d commit 383f599

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/pipeline.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ jobs:
5454
versionSpec: "6.x"
5555
preferLatestVersion: true
5656

57+
- name: gitversion - configure safe directory
58+
shell: bash
59+
run: |
60+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
61+
5762
- name: gitversion - execute
5863
id: gitversion
5964
uses: gittools/actions/gitversion/execute@v4.0.0

0 commit comments

Comments
 (0)