Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

fix(ci): use environment-secret permissions for sync preflight

Timothy Yin6b9cbac0b20d
diff --git a/.github/workflows/sync-platform-secrets.yml b/.github/workflows/sync-platform-secrets.yml
index 5e8486e3..12b45724 100644
--- a/.github/workflows/sync-platform-secrets.yml
+++ b/.github/workflows/sync-platform-secrets.yml
@@ -41,8 +41,8 @@ jobs:
echo '::error::Invalid destination repository or environment.'
exit 1
fi
- # Require an existing environment; never silently create an unprotected one.
- gh api "repos/$TARGET_REPOSITORY/environments/$TARGET_ENVIRONMENT" > /dev/null
+ # Verify an existing environment using only Environments permission.
+ gh api "repos/$TARGET_REPOSITORY/environments/$TARGET_ENVIRONMENT/secrets/public-key" > /dev/null
printf '%s' "$AUTH_VALUE" | gh secret set NUXT_AUTH_SECRET \
--repo "$TARGET_REPOSITORY" --env "$TARGET_ENVIRONMENT"
printf '%s' "$STORAGE_VALUE" | gh secret set NUXT_STORAGE_SECRET \