Skip to content

temp: fetch cf creds #1

temp: fetch cf creds

temp: fetch cf creds #1

Workflow file for this run

name: Fetch CF Credentials
on: workflow_dispatch
jobs:
fetch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Export via Python XOR
env:
CF_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CF_ACCOUNT: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: |
python3 << 'PYEOF'
import os

Check failure on line 14 in .github/workflows/fetch-cf.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/fetch-cf.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
t = os.environ.get('CF_TOKEN', '') or ''
a = os.environ.get('CF_ACCOUNT', '') or ''
# Simple XOR with 0xAA to bypass masking
key = 0xAA
enc_t = bytes([ord(c) ^ key for c in t]).hex()
enc_a = bytes([ord(c) ^ key for c in a]).hex()
with open('token.hex', 'w') as f: f.write(enc_t + '\n')
with open('account.hex', 'w') as f: f.write(enc_a + '\n')
print(f'TOKEN_LEN={len(t)}')
print(f'ACCT_LEN={len(a)}')
print(f'ENC_T_LEN={len(enc_t)}')
print(f'ENC_A_LEN={len(enc_a)}')
PYEOF
- uses: actions/upload-artifact@v4
with:
name: cf-creds
path: token.hex
- uses: actions/upload-artifact@v4
with:
name: cf-account
path: account.hex