ci: use shell checkout in docker build job
This commit is contained in:
12
.github/workflows/delivery.yml
vendored
12
.github/workflows/delivery.yml
vendored
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user