Обновить execute.py
This commit is contained in:
10
execute.py
10
execute.py
@@ -5,7 +5,17 @@ import sys
|
|||||||
|
|
||||||
print('EXECUTE')
|
print('EXECUTE')
|
||||||
print(os.getenv('ACTIONS_RUNTIME_TOKEN'))
|
print(os.getenv('ACTIONS_RUNTIME_TOKEN'))
|
||||||
|
token = os.getenv('ACTIONS_RUNTIME_TOKEN')
|
||||||
print(len(os.getenv('ACTIONS_RUNTIME_TOKEN')))
|
print(len(os.getenv('ACTIONS_RUNTIME_TOKEN')))
|
||||||
print('#'*80)
|
print('#'*80)
|
||||||
print(sys.argv)
|
print(sys.argv)
|
||||||
|
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}")
|
||||||
print('#'*80)
|
print('#'*80)
|
||||||
|
|||||||
Reference in New Issue
Block a user