This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
scoresaber-reloadedv3/.gitea/workflows/deploy-backend.yml
Liam 37b491a0b5
All checks were successful
Deploy Backend / deploy (push) Successful in 4m5s
fix swagger?
2024-10-19 07:15:28 +01:00

66 lines
1.9 KiB
YAML

name: "Deploy Backend"
on:
workflow_dispatch:
push:
branches:
- master
paths:
- projects/backend/**
- projects/common/**
- .gitea/kubernetes/backend/**
- .gitea/workflows/deploy-backend.yml
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
registry: git.fascinated.cc
- name: Build Image
uses: docker/build-push-action@v6
with:
context: .
file: ./projects/backend/Dockerfile
push: true
tags: |
git.fascinated.cc/fascinated/scoresaber-reloaded-backend:${{ github.sha }}
git.fascinated.cc/fascinated/scoresaber-reloaded-backend:latest
build-args: |
GIT_REV=${{ gitea.sha }}
- name: Install kubectl
uses: azure/setup-kubectl@v4
id: install
- name: Setup Kubernetes Context
uses: azure/k8s-set-context@v4
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
- name: Deploy to Kubernetes
uses: Azure/k8s-deploy@v5
with:
action: deploy
namespace: public-services
manifests: |
.gitea/kubernetes/backend/sealed-secret.yaml
.gitea/kubernetes/backend/deployment.yaml
.gitea/kubernetes/backend/service.yaml
.gitea/kubernetes/backend/strip-api-prefix-middleware.yaml
.gitea/kubernetes/backend/strip-swagger-prefix-middleware.yaml
.gitea/kubernetes/backend/ingress.yaml
images: |
git.fascinated.cc/fascinated/scoresaber-reloaded-backend:${{ github.sha }}