File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 10
10
11
11
_GITHUB_STEP_SUMMARY = Path (os .getenv ("GITHUB_STEP_SUMMARY" ))
12
12
13
+ # The top-level error message that gets rendered.
14
+ # This message wraps one of the other templates/messages defined below.
15
+ _ERROR_SUMMARY_MESSAGE = """
16
+ Trusted publisher (OIDC) exchange failure:
17
+
18
+ {message}
19
+
20
+ Read more about trusted publishers at https://docs.pypi.org/trusted-publishers/
21
+ """
22
+
13
23
# Rendered if OIDC identity token retrieval fails for any reason.
14
24
_TOKEN_RETRIEVAL_FAILED_MESSAGE = """
15
25
OIDC token retrieval failed: {identity_error}
53
63
54
64
def die (msg : str ) -> NoReturn :
55
65
with _GITHUB_STEP_SUMMARY .open ("a" , encoding = "utf-8" ) as io :
56
- print (msg , file = io )
66
+ print (_ERROR_SUMMARY_MESSAGE . format ( message = msg ) , file = io )
57
67
58
68
print (f"::error::OIDC exchange failure: { msg } " , file = sys .stderr )
59
69
sys .exit (1 )
You can’t perform that action at this time.
0 commit comments