mirror of
https://github.com/Sea-Haven-Industries/forgejo.git
synced 2026-09-30 06:33:11 +00:00
fix: add trap to ensure temp key file removal after GCP SA key creation
This commit is contained in:
parent
2298f95250
commit
30e3faabc7
1 changed files with 1 additions and 1 deletions
|
|
@ -102,6 +102,7 @@ echo "Granted objectViewer to $SA_EMAIL."
|
|||
echo ""
|
||||
echo "--- Step 9: Create and store service account key ---"
|
||||
KEY_FILE=$(mktemp)
|
||||
trap 'rm -f "$KEY_FILE"' EXIT
|
||||
$GCLOUD iam service-accounts keys create "$KEY_FILE" --iam-account="$SA_EMAIL"
|
||||
echo "Service account key created."
|
||||
|
||||
|
|
@ -118,7 +119,6 @@ else
|
|||
--region "$AWS_REGION"
|
||||
echo "Created secret forgejo/gcs-sa-key."
|
||||
fi
|
||||
rm -f "$KEY_FILE"
|
||||
echo "Key stored in AWS Secrets Manager, local copy deleted."
|
||||
|
||||
# --- Storage Transfer ---
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue