From bbe040cd86870c6eda440d1048ad6b28ab4f5733 Mon Sep 17 00:00:00 2001 From: Seokyoung_Hong <88967942+Seokyoung-Hong@users.noreply.github.com> Date: Sun, 2 Feb 2025 19:30:00 +0900 Subject: [PATCH] fix: Add check for existing GCP authentication before revoking --- .github/workflows/GCE_CD.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/GCE_CD.yml b/.github/workflows/GCE_CD.yml index db50a0c3..4507ec69 100644 --- a/.github/workflows/GCE_CD.yml +++ b/.github/workflows/GCE_CD.yml @@ -20,9 +20,12 @@ jobs: - name: Clean up GCP authentication files run: | - gcloud auth revoke --all + if gcloud auth list --format="value(account)" | grep -q '@'; then + gcloud auth revoke --all + fi rm -f ~/.config/gcloud/application_default_credentials.json + - name: Set up Cloud SDK uses: google-github-actions/setup-gcloud@v1 with: