Skip to content

0.2.5 #58

0.2.5 #58 #9

Workflow file for this run

name: deploy-cluster-prod
on:
push:
branches: ['master']
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{ secrets.GH_TOKEN }}
- name: Login to Vultr Container Registry
uses: docker/login-action@v2
with:
registry: sjc.vultrcr.com
username: ${{ secrets.VULTR_REGU }}
password: ${{ secrets.VULTR_REPW }}
- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
push: true
tags: |
sjc.vultrcr.com/medici/shin-server:latest
sjc.vultrcr.com/medici/shin-server:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
# - name: Build and push the Docker image
# uses: docker/build-push-action@v3
# with:
# push: true
# tags: |
# ghcr.io/medici-mansion/shinnyang-server:latest
# ghcr.io/medici-mansion/shinnyang-server:${{ github.sha }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
deploy:
name: Deploy
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Set the Kubernetes context
uses: azure/k8s-set-context@v2
with:
method: service-account
k8s-url: https://cc33adee-ae13-46cb-9388-19d5a494a094.vultr-k8s.com:6443
k8s-secret: ${{ secrets.KUBERNETES_SECRET }}
- name: Checkout source code
uses: actions/checkout@v3
- name: Deploy to the Kubernetes cluster
uses: azure/k8s-deploy@v1
with:
namespace: default
manifests: |
k8s/deployment-prod.yaml
images: |
sjc.vultrcr.com/medici/shin-server:${{ github.sha }}