2024-09-24 08:57:05 +00:00
|
|
|
name: "Deploy"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-09-24 09:01:37 +00:00
|
|
|
- run: echo ${{ gitea.sha }}
|
|
|
|
|
2024-09-24 08:57:05 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v3
|
2024-09-24 09:04:26 +00:00
|
|
|
env:
|
|
|
|
GIT_REV: "${{ gitea.sha }}"
|
2024-09-24 08:57:05 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
registry: git.fascinated.cc
|
2024-09-24 09:00:29 +00:00
|
|
|
build-args: |
|
|
|
|
GIT_REV=${{ gitea.sha }}
|
2024-09-24 08:57:05 +00:00
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
tags: fascinated/scoresaber-reloaded:latest
|
|
|
|
|
|
|
|
- name: Set up Kubectl
|
|
|
|
uses: azure/k8s-set-context@v1
|
|
|
|
with:
|
|
|
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
run: |
|
|
|
|
kubectl apply -f ./gitea/kubernetes/deployment.yaml
|
|
|
|
kubectl apply -f ./gitea/kubernetes/service.yaml
|
|
|
|
kubectl apply -f ./gitea/kubernetes/ingress.yaml
|