File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,18 +205,18 @@ jobs:
205205 token_json=$(curl -sS -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
206206 "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com")
207207 python - <<'PY'
208- import base64,json,sys
209- token_json = sys.stdin.read()
210- token = json.loads(token_json).get("value","")
211- if not token :
212- print("OIDC token missing")
213- sys.exit(0)
214- payload = token.split(".")[1]
215- payload += "=" * ((4 - len(payload) % 4) % 4)
216- data = json.loads(base64.urlsafe_b64decode(payload))
217- print(f"oidc.aud={data.get('aud')}")
218- print(f"oidc.sub={data.get('sub')}")
219- PY
208+ import base64,json,sys
209+ token_json = sys.stdin.read()
210+ token = json.loads(token_json).get("value","")
211+ if not token:
212+ print("OIDC token missing")
213+ sys.exit(0)
214+ payload = token.split(".")[1]
215+ payload += "=" * ((4 - len(payload) % 4) % 4)
216+ data = json.loads(base64.urlsafe_b64decode(payload))
217+ print(f"oidc.aud={data.get('aud')}")
218+ print(f"oidc.sub={data.get('sub')}")
219+ PY
220220 <<<"$token_json"
221221
222222 - name : Determine Docker tag
You can’t perform that action at this time.
0 commit comments