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