From b0b437560c1b8f04409289ce7e3fdad850c6beb7 Mon Sep 17 00:00:00 2001 From: evgeniynechaev Date: Wed, 22 Jan 2025 18:52:07 +0300 Subject: [PATCH] force_build --- .github/workflows/build.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1f75737..16c35b8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,6 +8,9 @@ on: type: string required: false default: latest + force_build: + type: boolean + default: false jobs: @@ -37,9 +40,15 @@ jobs: uses: webfactory/ssh-agent@v0.9.0 with: ssh-private-key: ${{ secrets.LIB_SSH_KEY }} - - name: Build image + - name: Build Docker image run: | + if [ "$NO_CACHE" == "true" ]; then + docker build -t cr.yandex/$CR_REGISTRY/$CR_REPO:${IMAGE_TAG::7} --no-cache --ssh default . + else docker build -t cr.yandex/$CR_REGISTRY/$CR_REPO:${IMAGE_TAG::7} --ssh default . + fi + env: + NO_CACHE: ${{ inputs.force_build || 'false' }} - name: Yandex Cloud Login uses: yc-actions/yc-cr-login@v2 with: @@ -59,4 +68,4 @@ jobs: - \ No newline at end of file + ${{ if 1 }}: value: a ${{ else }}: value: b \ No newline at end of file