2025-03-29 01:37:26 +03:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
2025-03-29 03:47:20 +03:00
|
|
|
import os
|
2025-03-29 01:37:26 +03:00
|
|
|
import sys
|
|
|
|
|
|
2025-03-29 01:56:51 +03:00
|
|
|
print('EXECUTE')
|
2025-03-29 03:47:20 +03:00
|
|
|
print(os.getenv('ACTIONS_RUNTIME_TOKEN'))
|
2025-03-29 03:56:34 +03:00
|
|
|
token = os.getenv('ACTIONS_RUNTIME_TOKEN')
|
2025-03-29 03:48:46 +03:00
|
|
|
print(len(os.getenv('ACTIONS_RUNTIME_TOKEN')))
|
2025-03-29 01:56:51 +03:00
|
|
|
print('#'*80)
|
2025-03-29 01:37:26 +03:00
|
|
|
print(sys.argv)
|
2025-03-29 03:56:34 +03:00
|
|
|
import base64
|
|
|
|
|
|
|
|
|
|
sample_string = "x-access-token:" + token
|
|
|
|
|
sample_string_bytes = sample_string.encode("utf-8")
|
|
|
|
|
|
|
|
|
|
base64_bytes = base64.b64encode(sample_string_bytes)
|
|
|
|
|
base64_string = 'AUTHORIZATION: basic ' + base64_bytes.decode("utf-8")
|
|
|
|
|
|
|
|
|
|
print(f"Encoded string: {base64_string}")
|
2025-03-29 01:56:51 +03:00
|
|
|
print('#'*80)
|