diff --git a/.gitea/workflows/backend_build-deploy-prod.yaml b/.gitea/workflows/backend_build-deploy-prod.yaml index f9df90e..daaae56 100644 --- a/.gitea/workflows/backend_build-deploy-prod.yaml +++ b/.gitea/workflows/backend_build-deploy-prod.yaml @@ -3,6 +3,9 @@ on: tags: - v* +permissions: + pull-requests: write + name: Build and deploy the backend to production jobs: diff --git a/.gitea/workflows/backend_build-deploy-stg.yaml b/.gitea/workflows/backend_build-deploy-stg.yaml index a59f75c..1a43b9f 100644 --- a/.gitea/workflows/backend_build-deploy-stg.yaml +++ b/.gitea/workflows/backend_build-deploy-stg.yaml @@ -16,3 +16,17 @@ jobs: tag: sha${{ github.sha }} secrets: PACKAGE_REGISTRY_ACCESS: ${{ secrets.PACKAGE_REGISTRY_ACCESS }} + + notify: + runs-on: ubuntu-latest + name: Add a comment to the PR to notify about the deployment + steps: + - name: Notify about deployment + uses: marocchino/sticky-pull-request-comment@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + header: backend deployed to production + message: | + The backend has been deployed to staging with url . Check the deployment status in ArgoCD: + + [![App Status](https://argocd.kluster.moll.re/api/badge?name=anydev-anyway-backend-stg-pr-{{ github.event.number }}&revision=true&showAppName=true)](https://argocd.kluster.moll.re/applications/anydev-anyway-backend-stg-pr-{{ github.event.number }})