fix: clone CMS from local bare repo in pack workflow (avoids runner HTTPS auth failure)
This commit is contained in:
1 parent
134bb97410
commit
cc4b7da756
1 file changed
+6
-2
@@ -32,7 +32,8 @@ jobs:
|
||||
run: |
|
||||
set -e
|
||||
exec 2>&1
|
||||
CMS_REF="$(git ls-remote https://gitlab.epicnabbo.nl/remco/EpicNext-Cms.git main 2>/dev/null | awk '{print $1}')"
|
||||
CMS_REF="$(git -C /docker/gitea/gitea/git/repositories/remco/epicnext-cms.git rev-parse main 2>/dev/null \
|
||||
|| git ls-remote https://gitlab.epicnabbo.nl/remco/EpicNext-Cms.git main 2>/dev/null | awk '{print $1}')"
|
||||
CAT_REF="$(git ls-remote https://gitlab.epicnabbo.nl/remco/Epicnabbo-Catalogus-Updated-Daily.git Beta-3 2>/dev/null | awk '{print $1}')"
|
||||
NITRO_REF="$(git ls-remote https://github.com/duckietm/Nitro-V3.git main 2>/dev/null | awk '{print $1}')"
|
||||
RENDER_REF="$(git ls-remote https://github.com/duckietm/Nitro_Render_V3.git main 2>/dev/null | awk '{print $1}')"
|
||||
@@ -85,8 +86,11 @@ jobs:
|
||||
run: |
|
||||
set -e
|
||||
S="$CACHE_DIR/cms"; mkdir -p "$S"
|
||||
BARE="/docker/gitea/gitea/git/repositories/remco/epicnext-cms.git"
|
||||
if [ "${{ steps.check.outputs.cms_ref }}" != "$(cat "$S/ref" 2>/dev/null)" ]; then
|
||||
git clone --depth 1 "${{ gitea.server_url }}/${{ gitea.repository }}.git" "$WORK/src/cms" 2>/dev/null \
|
||||
rm -rf "$WORK/src/cms"
|
||||
git clone --depth 1 "file://$BARE" "$WORK/src/cms" 2>/dev/null \
|
||||
|| git clone --depth 1 "${{ gitea.server_url }}/${{ gitea.repository }}.git" "$WORK/src/cms" 2>/dev/null \
|
||||
|| git -C "$WORK/src/cms" pull --ff-only 2>/dev/null
|
||||
echo "${{ steps.check.outputs.cms_ref }}" > "$S/ref"
|
||||
rm -rf "$S/snapshot"; cp -r "$WORK/src/cms" "$S/snapshot"
|
||||
|
||||
Reference in new issue
Block a user