Skip to content

Commit

Permalink
Skip delete SSH keys when none are present (#540)
Browse files Browse the repository at this point in the history
Resolves issue with deleting GCP ssh keys if none are there

Co-authored-by: Corey Cox <[email protected]>
  • Loading branch information
glass-ships and amc-corey-cox authored Jan 16, 2024
1 parent 3e05bae commit 28ab311
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build-and-deploy-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,13 @@ jobs:

- name: "Remove old SSH keys"
run: |
for i in $(gcloud compute os-login ssh-keys list | grep -v FINGERPRINT)
do
echo $i
gcloud compute os-login ssh-keys remove --key $i
done
if [[ $(gcloud compute os-login ssh-keys list | grep -v FINGERPRINT) ]]; then
for i in $(gcloud compute os-login ssh-keys list | grep -v FINGERPRINT)
do
echo $i
gcloud compute os-login ssh-keys remove --key $i
done
fi
- name: "Update API Service"
run: |
Expand Down

0 comments on commit 28ab311

Please sign in to comment.