Skip to content

Commit

Permalink
Merge pull request #55 from thomaseleff/v0.1.5
Browse files Browse the repository at this point in the history
Resolves Github action issue with deploy to Cloud Run
  • Loading branch information
thomaseleff authored Aug 14, 2024
2 parents 84aa58d + db3a437 commit 10cc21f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish-gcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,25 @@ jobs:
with:
project_id: ${{ secrets.PROJECT_ID }}

- name: Wait for the Docker image to be available in the Artifact Registry
run: |
AVAILABLE = false
for i in {1..36}; do
if gcloud artifacts docker images describe ${{ vars.REGION }}-docker.pkg.dev/${{ secrets.PROJECT_ID }}/${{ vars.REPOSITORY }}/${{ vars.IMAGE }}:${{ env.TAG }} > /dev/null 2>&1; then
echo "The Docker image is available in the Artifact Registry."
AVAILABLE = true
break
else
echo "Waiting for the Docker image to be available..."
sleep 10
fi
done
if [ "$AVAILABLE" = false ]; then
echo "ERROR: Unable to deploy to Cloud Run. The Docker image is not available in the Artifact Registry. Login to the Google Cloud console for more information."
exit 1
fi
- name: Deploy to Cloud Run
run: |
gcloud run deploy ${{ vars.SERVICE }} \
Expand Down

0 comments on commit 10cc21f

Please # to comment.