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
|
timeout-minutes: 30
|
||||||
|
|
||||||
steps:
|
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
|
- name: Log in to the container registry
|
||||||
|
shell: sh
|
||||||
env:
|
env:
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
@@ -52,6 +59,7 @@ jobs:
|
|||||||
printf '%s' "$REGISTRY_TOKEN" |
|
printf '%s' "$REGISTRY_TOKEN" |
|
||||||
docker login "$REGISTRY" --username admin --password-stdin
|
docker login "$REGISTRY" --username admin --password-stdin
|
||||||
- name: Build the cloud image
|
- name: Build the cloud image
|
||||||
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
--target yandex \
|
--target yandex \
|
||||||
@@ -61,11 +69,13 @@ jobs:
|
|||||||
--tag "$IMAGE:latest" \
|
--tag "$IMAGE:latest" \
|
||||||
.
|
.
|
||||||
- name: Push immutable and latest tags
|
- name: Push immutable and latest tags
|
||||||
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
docker push "$IMAGE:$GITHUB_SHA"
|
docker push "$IMAGE:$GITHUB_SHA"
|
||||||
docker push "$IMAGE:latest"
|
docker push "$IMAGE:latest"
|
||||||
- name: Log out from the container registry
|
- name: Log out from the container registry
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
shell: sh
|
||||||
run: docker logout "$REGISTRY" || true
|
run: docker logout "$REGISTRY" || true
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
|||||||
Reference in New Issue
Block a user