forked from Yara724/api
Allow git in bind-mounted workspace (safe.directory)
This commit is contained in:
@@ -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)"
|
||||||
|
|||||||
Reference in New Issue
Block a user