| workflow_payload |
name: Prepare exact public maintenance receipt wit name: Prepare exact public maintenance receipt without activation
"on":
workflow_dispatch:
jobs:
prepare:
name: prepare
runs-on: ubuntu-latest
if: github.repository == 'luoanwu/enterprise-platform'
steps:
- name: Prepare copies and test synthetic projection in a private network
run: |
set -eu
python3 <<'PY'
import os,re,subprocess,json
sha=os.environ.get('GITHUB_SHA','')
if not re.fullmatch('[a-f0-9]{40}',sha):raise RuntimeError('FIXED_SOURCE_REQUIRED')
repo='/home/git/repositories/luoanwu/enterprise-platform.git'
result=subprocess.run(['git','-c','safe.directory='+repo,'-C',repo,'show',sha+':ops/gitea-r1/window-receipt-preflight.py'],capture_output=True,timeout=20)
if result.returncode:raise RuntimeError('FIXED_PREFLIGHT_SOURCE_REQUIRED')
try:exec(compile(result.stdout,'window-receipt-preflight.py','exec'))
except Exception as error:
text=str(error)
safe=text if isinstance(error,RuntimeError) and re.fullmatch('[A-Z_]+',text) else type(error).__name__
print('GITEA_PUBLIC_RECEIPT_PREPARATION_JSON '+json.dumps({'kind':'GiteaPublicReceiptPreparation','ci':{'runId':os.environ.get('GITHUB_RUN_ID'),'sourceSha':sha},'status':'PREPARATION_FAILED_NO_ACTIVATION','error':safe,'liveNginxChanged':False,'liveServicesChanged':False,'maintenanceLaunched':False,'releaseEligible':False}),flush=True)
raise SystemExit(1)
PY
shell: bash
timeout-minutes: "5"
permissions:
contents: read
... |