forked from Yara724/api
Allow git in bind-mounted workspace (safe.directory)
This commit is contained in:
@@ -31,6 +31,7 @@ steps:
|
||||
volumes:
|
||||
- *workspace_volume
|
||||
commands:
|
||||
- git config --global --add safe.directory /workspace
|
||||
- cd /workspace
|
||||
- git pull origin main
|
||||
- date +%s > /workspace/.wp-deploy-start
|
||||
@@ -60,6 +61,7 @@ steps:
|
||||
- apk add --no-cache curl jq git > /dev/null
|
||||
- |
|
||||
set -euo pipefail
|
||||
git config --global --add safe.directory /workspace
|
||||
cd /workspace
|
||||
|
||||
COMMIT_HASH="$(git rev-parse --short HEAD)"
|
||||
@@ -109,6 +111,7 @@ steps:
|
||||
- apk add --no-cache curl jq git > /dev/null
|
||||
- |
|
||||
set -euo pipefail
|
||||
git config --global --add safe.directory /workspace
|
||||
cd /workspace
|
||||
|
||||
COMMIT_HASH="$(git rev-parse --short HEAD 2>/dev/null || echo unknown)"
|
||||
|
||||
Reference in New Issue
Block a user