| workflow_payload |
name: Discover existing cloud auth sources without name: Discover existing cloud auth sources without exporting credentials
"on":
workflow_dispatch:
jobs:
validate:
name: validate
runs-on: ubuntu-latest
if: github.repository == 'luoanwu/enterprise-platform'
steps:
- name: Inspect known cloud profiles and attached role presence only
run: |
set -eu
python3 <<'PY'
import os,re,subprocess,pathlib,tempfile
sha=os.environ.get('GITHUB_SHA','')
if not re.fullmatch('[0-9a-f]{40}',sha):raise RuntimeError('FIXED_SHA_REQUIRED')
with tempfile.TemporaryDirectory(prefix='auth-source-discovery-',dir='/var/lib/eios-r1-maintenance') as td:
for name in ['inspect-cloud-credentials.py','test-inspect-cloud-credentials.py']:
result=subprocess.run(['git','-c','safe.directory=/home/git/repositories/luoanwu/enterprise-platform.git','-c','core.hooksPath=/dev/null','-C','/home/git/repositories/luoanwu/enterprise-platform.git','show',sha+':ops/gitea-r1/'+name],capture_output=True,timeout=30)
if result.returncode:raise RuntimeError('FIXED_SCRIPT_UNAVAILABLE')
pathlib.Path(td,name).write_bytes(result.stdout)
subprocess.run(['python3',str(pathlib.Path(td,'test-inspect-cloud-credentials.py'))],check=True,timeout=30)
subprocess.run(['python3',str(pathlib.Path(td,'inspect-cloud-credentials.py'))],check=True,timeout=60)
PY
shell: bash
timeout-minutes: "10"
permissions:
contents: read
... |