-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add GitHub Actions workflow for GKE deployment #1433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This workflow builds a Docker container, publishes it to Google Container Registry, and deploys it to GKE on pushes to the main branch. It includes steps for authentication, Docker image building, and deployment configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new GitHub Actions workflow for building a Docker container and deploying it to Google Kubernetes Engine (GKE). The workflow is configured to trigger on pushes to the main branch and uses Workload Identity Federation for authentication.
Key Changes:
- New workflow file that automates the build and deployment pipeline to GKE
- Integration with Google Cloud services including Artifact Registry and GKE
- Use of pinned action versions for security and reproducibility
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| on: | ||
| push: | ||
| branches: | ||
| - '"main"' |
Copilot
AI
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The branch name has unnecessary double and single quotes. The value should be either main (unquoted) or 'main' (single-quoted), but not '\"main\"' which will cause the workflow to never trigger.
| - '"main"' | |
| - main |
| # Set up kustomize | ||
| - name: 'Set up Kustomize' | ||
| run: |- | ||
| curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.4.3/kustomize_v5.4.3_linux_amd64.tar.gz |
Copilot
AI
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The curl command downloads a tar.gz archive but saves it as a plain file named 'kustomize', then attempts to execute it directly. The file needs to be extracted first. The command should be: curl -sfLo kustomize.tar.gz <url> && tar xzf kustomize.tar.gz or use the direct binary URL without the .tar.gz extension.
| curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.4.3/kustomize_v5.4.3_linux_amd64.tar.gz | |
| curl -sfLo kustomize.tar.gz https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.4.3/kustomize_v5.4.3_linux_amd64.tar.gz | |
| tar xzf kustomize.tar.gz |
This workflow builds a Docker container, publishes it to Google Container Registry, and deploys it to GKE on pushes to the main branch. It includes steps for authentication, Docker image building, and deployment configuration.
Description:
Describe your changes.
Related issue:
Add link to the related issue.
Check list: