-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91ba93e
commit 6453645
Showing
4 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy to GKE | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Google Cloud SDK | ||
uses: google-github-actions/setup-gcloud@1bee7de035d65ec5da40a31f8589e240eba8fde5 | ||
with: | ||
project_id: ${{ secrets.GKE_PROJECT }} | ||
service_account_key: ${{ secrets.GKE_SA_KEY }} | ||
export_default_credentials: true | ||
|
||
- name: Configure kubectl | ||
run: | | ||
gcloud container clusters get-credentials ${{ secrets.GKE_CLUSTER }} --zone ${{ secrets.GKE_ZONE }} | ||
env: | ||
KUBECONFIG: ${{ runner.workspace }}/kubeconfig.yaml | ||
|
||
- name: Deploy to GKE | ||
run: | | ||
kubectl apply -f k8s/ | ||
working-directory: multicontainer-k8s | ||
|
||
# GKE_CLUSTER FAIT REF (cat docker-k8s-403619-30994923a33e.json | base64) le fichier json est le service account générer depuis google en donnant les permissions kubernetes engine admin au service account | ||
# GKE_PROJECT FAIT REF à l'id du projet dans le fichier json | ||
# GKE_CLUSTER est le nom de votre cluster | ||
# GKE_ZONE est la zone définit de votre cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters