From bbd7b449981e7589c8586bddae79cf3025373b58 Mon Sep 17 00:00:00 2001 From: steveoh Date: Mon, 15 Apr 2024 12:09:53 -0600 Subject: [PATCH] fix: use image id instead of latest --- action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a7e9add..9fd73ef 100644 --- a/action.yml +++ b/action.yml @@ -107,12 +107,18 @@ runs: cache-to: type=gha,mode=max provenance: false + - name: 🔍️ Set image name + shell: bash + run: | + IMAGE_ID=$(echo $DOCKER_METADATA_OUTPUT_TAGS | cut -d ' ' -f 1) + echo "IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV + - name: 🚀 Deploy to Cloud Run id: deploy uses: google-github-actions/deploy-cloudrun@v2 with: service: ${{ inputs.service }} - image: us-central1-docker.pkg.dev/${{ inputs.project-id }}/images/${{ inputs.service }}:latest + image: ${{ env.IMAGE_ID }} region: ${{ inputs.region }} env_vars: ${{ inputs.env-vars }} flags: ${{ inputs.flags }}