minecluster/.forgejo/workflows/deploy-edge.yml

45 lines
1.7 KiB
YAML
Raw Normal View History

2024-08-25 10:56:04 -06:00
name: Deploy USW-MC
run-name: ${{ forgejo.actor }} Deploy USW-MC
on:
2024-08-25 11:18:08 -06:00
push:
branches: [master]
2024-08-25 10:56:04 -06:00
env:
GARDEN_DEPLOY_ACTION: minecluster
jobs:
deploy-edge:
steps:
# Configure proper kubeconfig (Used when cluster does not match the edge environment)
2024-08-25 11:18:08 -06:00
- name: Get usw-mc deployment kubeconfig
uses: https://forgejo.dunemask.dev/elysium/elysium-actions@infisical-env
with:
infisical-token: ${{ secrets.INFISICAL_ELYSIUM_EDGE_READ_TOKEN }}
infisical-project: ${{ vars.INFISICAL_DEPLOYMENTS_PROJECT_ID }}
secret-envs: edge
secret-paths: /kubernetes/usw-mc
2024-08-25 10:56:04 -06:00
# Setup Oasis
- name: Oasis Setup
uses: https://forgejo.dunemask.dev/elysium/elysium-actions@oasis-setup-auto
with:
deploy-env: edge
infisical-token: ${{ secrets.INFISICAL_ELYSIUM_EDGE_READ_TOKEN }}
infisical-project: ${{ vars.INFISICAL_DEPLOYMENTS_PROJECT_ID }}
extra-secret-paths: /dashboard
extra-secret-envs: edge
# Deploy to Edge
- name: Deploy to Edge env
run: garden deploy $GARDEN_DEPLOY_ACTION --force --force-build --env usw-edge
working-directory: ${{ env.OASIS_WORKSPACE }}
2024-08-25 11:18:08 -06:00
env: # (Used when cluster does not match the edge environment)
MCL_KUBECONFIG: ${{ env.KUBERNETES_CONFIG_USW_MC }}
2024-08-25 10:56:04 -06:00
# Alert via Discord
- name: Discord Alert
if: always()
uses: https://forgejo.dunemask.dev/elysium/elysium-actions@discord-status
with:
status: ${{ job.status }}
channel: deployments
header: DEPLOY MC
2024-08-25 11:18:08 -06:00
additional-content: "Minecluster Server Manager Deployment"