diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 012a5d7..b2285e7 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -107,4 +107,34 @@ jobs: file: ./backend/Dockerfile platforms: linux/amd64,linux/arm64 tags: scr.siteworxpro.com/reloading-manager/backend:latest - push: true \ No newline at end of file + push: true + + Deploy: + name: ๐Ÿš€โœจ Deploy Application + runs-on: ubuntu-latest + needs: [BuildFrontend, BuildBackend] + steps: + + - name: ๐Ÿ›ก๏ธ๐Ÿ”’ Add Siteworx CA Certificates + run: | + apt update && apt install -yq ca-certificates curl + curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt + update-ca-certificates + + - name: ๐Ÿ“–๐Ÿ” Checkout Repository Code + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: ๐Ÿ“๐Ÿ”ง Update Deployment Manifest + run: | + sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml + + - name: ๐Ÿ’พโœ… Commit Updated Manifest + uses: EndBug/add-and-commit@v9 + with: + add: argocd/deployment/deployment.yml + author_name: "GitHub Action ๐Ÿค–" + author_email: gitia@siteworxpro.com + message: "๐Ÿ“๐Ÿ”„ Update deployment manifest with new image tags" + diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml deleted file mode 100644 index 5fe4831..0000000 --- a/.gitea/workflows/deploy.yml +++ /dev/null @@ -1,33 +0,0 @@ -on: - workflow_run: - workflows: ["build.yml"] - types: - - completed -jobs: - Deploy: - name: ๐Ÿš€โœจ Deploy Application - runs-on: ubuntu-latest - steps: - - - name: ๐Ÿ›ก๏ธ๐Ÿ”’ Add Siteworx CA Certificates - run: | - apt update && apt install -yq ca-certificates curl - curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt - update-ca-certificates - - - name: ๐Ÿ“–๐Ÿ” Checkout Repository Code - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - - name: ๐Ÿ“๐Ÿ”ง Update Deployment Manifest - run: | - sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml - - - name: ๐Ÿ’พโœ… Commit Updated Manifest - uses: EndBug/add-and-commit@v9 - with: - add: argocd/deployment/deployment.yml - author_name: "GitHub Action ๐Ÿค–" - author_email: gitia@siteworxpro.com - message: "๐Ÿ“๐Ÿ”„ Update deployment manifest with new image tags" \ No newline at end of file diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 0865ee9..014cce6 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -3,7 +3,7 @@ on: branches: - "*" -name: ๐Ÿงชโœจ Unit Tests +name: ๐Ÿงชโœจ Unit Tests Workflow jobs: build-javascript: diff --git a/argocd/deployment/deployment.yml b/argocd/deployment/deployment.yml index a80cb21..1569c29 100644 --- a/argocd/deployment/deployment.yml +++ b/argocd/deployment/deployment.yml @@ -15,10 +15,10 @@ spec: - siteworxpro containers: - name: frontend - image: scr.siteworxpro.com/reloading-manager/frontend:test + image: scr.siteworxpro.com/reloading-manager/frontend:test-build ports: - containerPort: 80 - name: backend - image: scr.siteworxpro.com/reloading-manager/backend:test + image: scr.siteworxpro.com/reloading-manager/backend:test-build ports: - containerPort: 8080