From a1a499f8778361dc1b96b4e319f1880a5dc461f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20O=CC=88zkorkmaz?= Date: Fri, 17 Oct 2025 17:49:57 +0200 Subject: [PATCH] CI Test --- .gitea/workflows/deploy.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 723d092..5254ae3 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -28,17 +28,17 @@ jobs: # # env: # IMAGE_NAME: angular-web-app -# TAG: ${{ github.ref_name == 'main' && 'latest' || github.ref_name }} +# TAG: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }} push: - name: ⬆️ Push Image to Gitea Registry + name: ⬆️ Build and Push Image to Gitea Registry runs-on: ubuntu-latest -# needs: build + needs: build steps: - name: Checkout Repository uses: actions/checkout@v3 - - name: Push Image + - name: Build and Push Image run: | sudo apt-get update sudo apt-get install -y docker.io bash @@ -51,7 +51,7 @@ jobs: env: IMAGE_NAME: angular-web-app - TAG: ${{ github.ref_name == 'main' && 'latest' || github.ref_name }} + TAG: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }} GITEA_REGISTRY: gitea.moz-tech.de deploy: @@ -67,17 +67,18 @@ jobs: - name: Deploy via SSH run: | + IMAGE_TAG="${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}" echo "${{ secrets.DEPLOY_KEY }}" > /tmp/deploy_key.pem chmod 600 /tmp/deploy_key.pem ssh -i /tmp/deploy_key.pem -o StrictHostKeyChecking=no \ - ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} <<'EOF' + ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} <