From d3e298e73c2abb20a31cee6a6a7a012ef872329a Mon Sep 17 00:00:00 2001 From: Aleksandr Komarov Date: Mon, 16 Dec 2024 13:16:25 +0400 Subject: [PATCH] chore/ci: Stubs variables for testing --- .github/workflows/publish_image.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish_image.yml b/.github/workflows/publish_image.yml index 4b84950..c59566c 100644 --- a/.github/workflows/publish_image.yml +++ b/.github/workflows/publish_image.yml @@ -48,7 +48,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=${{ inputs.tag }} + type=raw,value=${{ inputs.tag || 'test' }} type=sha - name: Build and push image id: push @@ -66,7 +66,7 @@ jobs: DEMO_USER: ${{ secrets.DEMO_USER }} DEMO_HOST: ${{ secrets.DEMO_HOST }} DEMO_APP_DIR: ${{ secrets.DEMO_APP_DIR }} - if: ${{ inputs.tag }} + if: ${{ inputs.deploy_to_demo || true }} needs: [build-image] permissions: contents: read @@ -78,7 +78,7 @@ jobs: run: > ssh ${{ env.DEMO_USER }}@${{ env.DEMO_HOST }} 'cd ${{ env.DEMO_APP_DIR }} && - echo "NEKKO_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" > .env && + echo "NEKKO_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.tag || 'test' }}" > .env && sudo docker-compose pull && sudo docker-compose up --force-recreate -d' - if: ${{ env.DEMO_USER == '' || env.DEMO_HOST == '' || env.DEMO_APP_DIR == '' }}