Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m35s
Build and deploy the backend to staging / Add a comment to the PR to notify about the deployment (pull_request) Successful in 5s
Run linting on the backend code / Build (pull_request) Has been cancelled
Run testing on the backend code / Build (pull_request) Has been cancelled
44 lines
1.6 KiB
YAML
44 lines
1.6 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: Download gitea client
|
|
run: |
|
|
curl -sSL -o tea https://dl.gitea.com/tea/0.11.0/tea-0.11.0-linux-amd64
|
|
chmod +x tea
|
|
|
|
- name: Login
|
|
run: |
|
|
./tea login add --url git.kluster.moll.re --name bot --token ${{ secrets.GITEA_TOKEN }}
|
|
./tea login default
|
|
- name: Post comment
|
|
run: |
|
|
./tea comment --repo anydev/anyway --login bot ${{ github.event.number }} """
|
|
The backend has been deployed to staging with url https://pr-${{ github.event.number }}.anyway-stg.anydev.info. Check the deployment status in ArgoCD:
|
|
|
|
[](https://argocd.kluster.moll.re/applications/anydev-anyway-backend-stg-pr-${{ github.event.number }})
|
|
"""
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
GITEA_BASE_URL: ${{ secrets.GITEA_BASE_URL }}
|
|
GITEA_REPO: ${{ secrets.GITEA_REPO }}
|