所以我已经在 GKE 中部署了这个项目,并且我正在尝试从 github 操作制作 CI/CD。所以我添加了工作流程文件,其中包含
name: Build and Deploy to GKE
on:
push:
branches:
- main
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }} # Add your cluster name here.
GKE_ZONE: ${{ secrets.GKE_ZONE }} # Add your cluster zone here.
DEPLOYMENT_NAME: ems-app # Add your deployment name here.
IMAGE: ciputra-ems-backend
jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v2
# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
with:
service_account_key: ${{ …Run Code Online (Sandbox Code Playgroud) kubernetes google-kubernetes-engine kubectl github-actions kustomize