CI Test
Some checks failed
Some checks failed
This commit is contained in:
@@ -11,7 +11,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: 🏗️ Build Docker Image
|
name: 🏗️ Build Docker Image
|
||||||
runs-on: docker
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
|
|
||||||
push:
|
push:
|
||||||
name: ⬆️ Push Image to Gitea Registry
|
name: ⬆️ Push Image to Gitea Registry
|
||||||
runs-on: docker
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: 🚀 Deploy to Remote Server
|
name: 🚀 Deploy to Remote Server
|
||||||
runs-on: docker
|
runs-on: ubuntu-latest
|
||||||
needs: push
|
needs: push
|
||||||
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
|
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
|
||||||
steps:
|
steps:
|
||||||
@@ -74,3 +74,23 @@ jobs:
|
|||||||
docker rm angular-web-app || true
|
docker rm angular-web-app || true
|
||||||
docker run -d --name angular-web-app -p 80:80 gitea.moz-tech.de/${{ secrets.CI_REGISTRY_USER }}/angular-web-app:latest
|
docker run -d --name angular-web-app -p 80:80 gitea.moz-tech.de/${{ secrets.CI_REGISTRY_USER }}/angular-web-app:latest
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# 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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user