Skip to content

Commit

Permalink
update gcp CI/CD test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
m4a1carbin4 committed Jan 25, 2024
1 parent cfe9b95 commit 30d42c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main_CI_CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:

env:
PROJECT_ID: "Ttucktak" # TODO: update Google Cloud project id
REPOSITORY: "ttucktakrepo" # TODO: update Artifact Registry repository name
REPOSITORY: "wgnwmgm" # TODO: update Artifact Registry repository name
SERVICE: "TtucktakServer" # TODO: update Cloud Run service name
GCE_INSTANCE: ${{ secrets.GCE_INSTANCE }}
GCE_INSTANCE_ZONE: ${{ secrets.GCE_INSTANCE_ZONE}}
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Google Auth
id: auth
uses: 'google-github-actions/auth@v0'
uses: 'google-github-actions/auth@v2'
with:
token_format: 'access_token'
workload_identity_provider: '${{ secrets.WIF_PROVIDER }}' # e.g. - projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider
Expand All @@ -79,12 +79,12 @@ jobs:

- name: Build and Push Container
run: |-
docker build -t "${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}" ./
docker push "${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}"
docker build -t "${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}" ./
docker push "${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}"
# END - Docker auth and build
- name: Deploy
run: |-
gcloud compute instances update-container "$GCE_INSTANCE" \
--zone "$GCE_INSTANCE_ZONE" \
--container-image "${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}"
--container-image "${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}"

0 comments on commit 30d42c1

Please sign in to comment.