++ fix stale checkout skip, compare to GITHUB_SHA not just file presence

This commit is contained in:
Kochetkov S 2026-08-11 14:56:52 +03:00
parent fcd6672ee2
commit 7f6940b8ba

View File

@ -70,8 +70,8 @@ jobs:
steps:
- name: Checkout (without Node.js action)
run: |
if [ -f infrastructure.yaml ] && [ -d live ]; then
echo "Workspace already contains repository files, skip checkout."
if [ -f infrastructure.yaml ] && [ -d live ] && [ "$(git rev-parse HEAD 2>/dev/null)" = "${GITHUB_SHA}" ]; then
echo "Workspace already at ${GITHUB_SHA}, skip checkout."
exit 0
fi
@ -139,8 +139,8 @@ jobs:
steps:
- name: Checkout (without Node.js action)
run: |
if [ -f infrastructure.yaml ] && [ -d live ]; then
echo "Workspace already contains repository files, skip checkout."
if [ -f infrastructure.yaml ] && [ -d live ] && [ "$(git rev-parse HEAD 2>/dev/null)" = "${GITHUB_SHA}" ]; then
echo "Workspace already at ${GITHUB_SHA}, skip checkout."
exit 0
fi
@ -207,8 +207,8 @@ jobs:
steps:
- name: Checkout (without Node.js action)
run: |
if [ -f infrastructure.yaml ] && [ -d live ]; then
echo "Workspace already contains repository files, skip checkout."
if [ -f infrastructure.yaml ] && [ -d live ] && [ "$(git rev-parse HEAD 2>/dev/null)" = "${GITHUB_SHA}" ]; then
echo "Workspace already at ${GITHUB_SHA}, skip checkout."
exit 0
fi