on: push: tags: - v* permissions: pull-requests: write name: Build and deploy the backend to production jobs: build-and-push: name: Build and push image uses: ./.gitea/workflows/workflow_build-image.yaml with: # sets the tag to the git tag that triggered the workflow - the deployment (configured in a separate repository) will use this tag and be deployed to production by argocd tag: ${{ github.ref_name }} 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 }})