1
0
forked from Yara724/api

Allow git in bind-mounted workspace (safe.directory)

This commit is contained in:
2026-07-15 16:43:31 +03:30
parent 9742fecc11
commit 36fa1c552e

View File

@@ -31,6 +31,7 @@ steps:
volumes: volumes:
- *workspace_volume - *workspace_volume
commands: commands:
- git config --global --add safe.directory /workspace
- cd /workspace - cd /workspace
- git pull origin main - git pull origin main
- date +%s > /workspace/.wp-deploy-start - date +%s > /workspace/.wp-deploy-start
@@ -60,6 +61,7 @@ steps:
- apk add --no-cache curl jq git > /dev/null - apk add --no-cache curl jq git > /dev/null
- | - |
set -euo pipefail set -euo pipefail
git config --global --add safe.directory /workspace
cd /workspace cd /workspace
COMMIT_HASH="$(git rev-parse --short HEAD)" COMMIT_HASH="$(git rev-parse --short HEAD)"
@@ -109,6 +111,7 @@ steps:
- apk add --no-cache curl jq git > /dev/null - apk add --no-cache curl jq git > /dev/null
- | - |
set -euo pipefail set -euo pipefail
git config --global --add safe.directory /workspace
cd /workspace cd /workspace
COMMIT_HASH="$(git rev-parse --short HEAD 2>/dev/null || echo unknown)" COMMIT_HASH="$(git rev-parse --short HEAD 2>/dev/null || echo unknown)"