Skip to content

Commit

Permalink
Splitting build and deploy, adding gke auth plugin env var
Browse files Browse the repository at this point in the history
  • Loading branch information
bergsalex committed Dec 11, 2023
1 parent a659c4d commit 1e29801
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/_skaffold-deploy-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,32 @@ jobs:
skaffold build \
--default-repo=${{ inputs.default_image_repo }} \
--file-output=build.json
- name: Upload build artifact JSON
uses: actions/upload-artifact@v3
with:
name: Build Artifacts
path: build.json
deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
needs: build
steps:
- name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCLOUD_CLUSTER_SA_KEY }}'
- name: Get Cluster Credentials
run: |
export USE_GKE_GCLOUD_AUTH_PLUGIN=True
gcloud container clusters get-credentials ${{ vars.CLUSTER_NAME }} \
--region ${{ vars.CLUSTER_REGION }} \
--project ${{ vars.CLUSTER_PROJECT }}
- name: Download coverage report artifact
uses: actions/download-artifact@v3
with:
name: Build Artifacts
- name: Deploy
run: |
skaffold deploy \
--profile ${{ inputs.environment }} \
--build-artifacts=build.json
- name: Upload build artifact JSON
uses: actions/upload-artifact@v3
with:
name: Build Artifacts
path: build.json

0 comments on commit 1e29801

Please sign in to comment.