From 65dbe317d119b9d9793162dc3eaacecbd2b1b9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20O=CC=88zkorkmaz?= Date: Fri, 17 Oct 2025 17:27:55 +0200 Subject: [PATCH] CI Test --- .gitea/workflows/deploy.yml | 42 ++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d9da24d..9e85c82 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -4,7 +4,6 @@ on: push: branches: - main - # Optional: fΓΌhre auch bei Tag-Releases ein Deployment durch tags: - '*' @@ -18,7 +17,8 @@ jobs: - name: Install Docker client run: | - apk add --no-cache docker-cli bash + sudo apt-get update + sudo apt-get install -y docker.io bash - name: Build Docker Image run: | @@ -40,13 +40,15 @@ jobs: - name: Push Image run: | - apk add --no-cache bash docker-cli + sudo apt-get update + sudo apt-get install -y docker.io bash cd docker chmod +x ./push-to-gitea.sh export GITEA_REGISTRY="${{ env.GITEA_REGISTRY }}" export GITEA_USER="${{ secrets.CI_REGISTRY_USER }}" export GITEA_TOKEN="${{ secrets.CI_REGISTRY_PASSWORD }}" ./push-to-gitea.sh "${{ env.IMAGE_NAME }}" "${{ env.TAG }}" + env: IMAGE_NAME: angular-web-app TAG: ${{ github.ref_name == 'main' && 'latest' || github.ref_name }} @@ -59,7 +61,9 @@ jobs: if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') steps: - name: Prepare environment - run: apk add --no-cache openssh-client docker-cli + run: | + sudo apt-get update + sudo apt-get install -y openssh-client docker.io - name: Deploy via SSH run: | @@ -75,22 +79,22 @@ jobs: docker run -d --name angular-web-app -p 80:80 gitea.moz-tech.de/${{ secrets.CI_REGISTRY_USER }}/angular-web-app:latest EOF +# notify: +# name: πŸ”” Notify Deployment Result +# runs-on: ubuntu-latest +# needs: deploy +# if: always() +# steps: +# - name: Send Discord Notification +# run: | +# STATUS=${{ job.status }} +# MESSAGE="πŸš€ *Angular-Web-App Deployment* (${{ github.ref_name }}) finished with status: **${STATUS}**" +# curl -H "Content-Type: application/json" \ +# -X POST \ +# -d "{\"content\": \"${MESSAGE}\"}" \ +# ${{ secrets.DISCORD_WEBHOOK_URL }} + # deploy-prod: # if: startsWith(github.ref, 'refs/tags/') # deploy-staging: # if: github.ref == 'refs/heads/dev' - -# notify: -# name: πŸ”” Notify Deployment Result -# runs-on: ubuntu-latest -# needs: [ deploy ] -# if: always() -# steps: -# - name: Send Discord Notification -# run: | -# STATUS=${{ job.status }} -# MESSAGE="πŸš€ *Angular-Web-App Deployment* (${{ github.ref_name }}) finished with status: **${STATUS}**" -# curl -H "Content-Type: application/json" \ -# -X POST \ -# -d "{\"content\": \"${MESSAGE}\"}" \ -# ${{ secrets.DISCORD_WEBHOOK_URL }}