Files
anyway/.gitea/workflows/backend_build-deploy-stg.yaml
Remy Moll 219cfcf1a6
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m49s
Build and deploy the backend to staging / Add a comment to the PR to notify about the deployment (pull_request) Failing after 21s
Run linting on the backend code / Build (pull_request) Has been cancelled
Run testing on the backend code / Build (pull_request) Has been cancelled
try with correct url?
2025-10-14 14:50:27 +02:00

33 lines
1.2 KiB
YAML

on:
pull_request:
branches:
- main
paths:
- backend/**
name: Build and deploy the backend to staging
jobs:
build-and-push:
name: Build and push image
uses: ./.gitea/workflows/workflow_build-image.yaml
with:
# sets a unique tag for each commit in the PR - this gets deployed to a separate application instance using argocd
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: https://github.com/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 <https://pr-{{ github.event.number }}.anyway-stg.anydev.info>. 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 }})