ci: use shell checkout in docker build job
All checks were successful
delivery / quality (3.10) (push) Successful in 11s
delivery / quality (3.12) (push) Successful in 12s
delivery / build-and-push (push) Successful in 8s
delivery / deploy (push) Successful in 15s

This commit is contained in:
kandrusyak
2026-07-28 00:53:25 +03:00
parent 2d4278051b
commit 971e32ecd1

View File

@@ -43,8 +43,15 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Check out the exact commit
shell: sh
run: |
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git fetch --depth 1 origin "$GITHUB_SHA"
git checkout --detach FETCH_HEAD
- name: Log in to the container registry
shell: sh
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
@@ -52,6 +59,7 @@ jobs:
printf '%s' "$REGISTRY_TOKEN" |
docker login "$REGISTRY" --username admin --password-stdin
- name: Build the cloud image
shell: sh
run: |
docker build \
--target yandex \
@@ -61,11 +69,13 @@ jobs:
--tag "$IMAGE:latest" \
.
- name: Push immutable and latest tags
shell: sh
run: |
docker push "$IMAGE:$GITHUB_SHA"
docker push "$IMAGE:latest"
- name: Log out from the container registry
if: ${{ always() }}
shell: sh
run: docker logout "$REGISTRY" || true
deploy: