CI Test
Some checks failed
Build, Push & Deploy Angular App / 🏗️ Build Docker Image (push) Successful in 1m29s
Build, Push & Deploy Angular App / ⬆️ Push Image to Gitea Registry (push) Failing after 55s
Build, Push & Deploy Angular App / 🚀 Deploy to Remote Server (push) Has been skipped

This commit is contained in:
Murat Özkorkmaz
2025-10-17 17:27:55 +02:00
parent 3cc7a73a49
commit 65dbe317d1

View File

@@ -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 }}