Skip to content

Commit

Permalink
Adding env for tag
Browse files Browse the repository at this point in the history
  • Loading branch information
adilshehzad786 committed Apr 6, 2024
1 parent f54ead7 commit 4b0d974
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ jobs:
- name: Build image Build and Tag
run: |
DOCKER_BUILDKIT=0
docker build -t ${GCR_REGISTRY}/${{ secrets.GCP_PROJECT_ID }}/${GCR_IMAGE}/helloworld:${{ steps.versioning.outputs.new_tag }} .
docker build -t ${GCR_REGISTRY}/${{ secrets.GCP_PROJECT_ID }}/${GCR_IMAGE}/helloworld:${{ env.NEW_TAG }} .
- name: Docker Push to Google Registry
run: |
docker push ${GCR_REGISTRY}/${{ secrets.GCP_PROJECT_ID }}/${GCR_IMAGE}/helloworld:${{steps.versioning.outputs.new_tag }}
docker push ${GCR_REGISTRY}/${{ secrets.GCP_PROJECT_ID }}/${GCR_IMAGE}/helloworld:${{ env.NEW_TAG }}
- name: Deploying Cloud Run with Latest image
run: |
gcloud run deploy helloworld \
--region ${GCR_REGION} \
--image ${GCR_REGISTRY}/${{ secrets.GCP_PROJECT_ID }}/${GCR_IMAGE}/helloworld:${{ steps.versioning.outputs.new_tag }} \
--image ${GCR_REGISTRY}/${{ secrets.GCP_PROJECT_ID }}/${GCR_IMAGE}/helloworld:${{ env.NEW_TAG }} \
--platform managed \
--allow-unauthenticated \
--project ${{ secrets.GCP_PROJECT_ID }}

0 comments on commit 4b0d974

Please sign in to comment.