You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* validate_secrets.yml: Pass a "Could not install WWDR certificate" error through validation
* validate_secrets.yml: Improve annotation when a public Match-Secrets repo exists
* validate_secrets.yml: Rewrite Match-Secrets validation to be explicit about the Match-Secrets repository that will be used
When the GH account that the GH_PAT token was created under does not match the repository_owner of the LoopWorkspace repository, the validation routine used a different Match-Secrets repository than fastlane.
* validate_secrets.yml: Rewrite GH_PAT validation to capture scopes and distinguish between classic and fine-grained access tokens
* validate_secrets.yml: Fix syntax error in Match-Secrets validation job
* validate_secrets.yml: Depend less on patterns / read scopes from any token that provides them
* Provide HAS_WORKFLOW_PERMISSION as an output
* validate_secrets.yml: Annotate failures from unaccepted Apple PLAs
* validate_secrets.yml: Fix typo and improve annotation when GH_PAT is invalid
* validate_secrets.yml: Improve annotation when authorization fails and token format is unknown
* validate_secrets.yml: Minor wording tweak
echo "::error::Unable to connect to GitHub using the GH_PAT secret. Verify that it is set correctly (including the 'ghp_' or 'github_pat_' prefix) and try again."
47
+
else
48
+
echo "::error::Unable to connect to GitHub using the GH_PAT secret. Verify that the token exists and has not expired at https://github.com/settings/tokens. If necessary, regenerate or create a new token (and update the secret), then try again."
49
+
fi
50
+
elif [[ $scopes =~ workflow ]]; then
51
+
echo "The GH_PAT secret has repo and workflow permissions."
echo "The GH_PAT secret has repo (but not workflow) permissions."
55
+
elif [ $provides_scopes ]; then
56
+
failed=true
57
+
if [ -z "$scopes" ]; then
58
+
echo "The GH_PAT secret is valid and can be used to connect to GitHub, but it does not provide any permission scopes."
59
+
else
60
+
echo "The GH_PAT secret is valid and can be used to connect to GitHub, but it only provides the following permission scopes: $scopes"
61
+
fi
62
+
echo "::error::The GH_PAT secret is lacking at least the 'repo' permission scope required to access the Match-Secrets repository. Update the token permissions at https://github.com/settings/tokens (to include the 'repo' and 'workflow' scopes) and try again."
63
+
else
64
+
echo "The GH_PAT secret is valid and can be used to connect to GitHub, but it does not provide inspectable scopes. Assuming that the 'repo' and 'workflow' permission scopes required to access the Match-Secrets repository and perform automations are present."
echo "Created a private '${{ github.repository_owner }}/Match-Secrets' repository."
45
95
else
46
96
failed=true
47
-
echo "::error::Cannot access or create a private 'Match-Secrets' repository. The GH_PAT secret is lacking at least the 'repo' permission scope required to access or create the repository.\
48
-
Verify that token permissions are set correctly (or update them) at https://github.com/settings/tokens and try again."
97
+
echo "::error::Unable to create a private '${{ github.repository_owner }}/Match-Secrets' repository. Create a private 'Match-Secrets' repository manually and try again. If a private 'Match-Secrets' repository already exists, verify that the token permissions of the GH_PAT are set correctly (or update them) at https://github.com/settings/tokens and try again."
# Otherwise, if a Match-Secrets repository exists, but it is public, cause validation to fail.
100
+
elif [[ "$visibility" == "public" ]]; then
51
101
failed=true
52
-
echo "::error::A 'Match-Secrets' repository was found, but it is is public. Delete it and try again (a private repository will be created for you)."
102
+
echo "::error::A '${{ github.repository_owner }}/Match-Secrets' repository was found, but it is public. Change the repository visibility to private (or delete it) and try again. If necessary, a private repository will be created for you."
103
+
else
104
+
echo "Found a private '${{ github.repository_owner }}/Match-Secrets' repository to use."
53
105
fi
54
106
55
107
# Exit unsuccessfully if secret validation failed.
echo "::error::Unable to create a valid authorization token for the App Store Connect API. Verify that the latest developer program license agreement has been accepted at https://developer.apple.com/account (review and accept any updated agreement), then wait a few minutes for changes to propagate and try again."
181
+
elif ! grep -q -e "No code signing identity found" -e "Could not install WWDR certificate" fastlane.log; then
127
182
failed=true
128
-
echo "::error::Unable to create a valid authorization token for the App Store Connect API.\
129
-
Verify that the FASTLANE_ISSUER_ID, FASTLANE_KEY_ID, and FASTLANE_KEY secrets are set correctly and try again."
183
+
echo "::error::Unable to create a valid authorization token for the App Store Connect API. Verify that the FASTLANE_ISSUER_ID, FASTLANE_KEY_ID, and FASTLANE_KEY secrets are set correctly and try again."
0 commit comments