65 lines
3.0 KiB
YAML
65 lines
3.0 KiB
YAML
name: Production handoff status (not deployed)
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Release production images"]
|
|
branches: [main]
|
|
types: [completed]
|
|
|
|
jobs:
|
|
deployment-status:
|
|
name: NOT DEPLOYED - handoff status only
|
|
if: >-
|
|
gitea.event.workflow_run.conclusion == 'success' &&
|
|
gitea.event.workflow_run.event == 'workflow_run' &&
|
|
gitea.event.workflow_run.head_branch == 'main'
|
|
runs-on: akyldash-ci
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: main
|
|
- name: Verify source release identity before artifact lookup
|
|
env:
|
|
SOURCE_WORKFLOW: ${{ gitea.event.workflow.name }}
|
|
SOURCE_WORKFLOW_PATH: ${{ gitea.event.workflow_run.path }}
|
|
SOURCE_EVENT: ${{ gitea.event.workflow_run.event }}
|
|
SOURCE_CONCLUSION: ${{ gitea.event.workflow_run.conclusion }}
|
|
SOURCE_BRANCH: ${{ gitea.event.workflow_run.head_branch }}
|
|
SOURCE_RUN_ID: ${{ gitea.event.workflow_run.id }}
|
|
SOURCE_SHA: ${{ gitea.event.workflow_run.head_sha }}
|
|
SOURCE_REPOSITORY: ${{ gitea.event.repository.full_name }}
|
|
run: python3 infra/deploy/release_handoff.py validate-handoff-source
|
|
- name: Read artifact metadata with the installed Gitea helper when available
|
|
env:
|
|
GITEA_URL: ${{ gitea.server_url }}
|
|
GITEA_TOKEN: ${{ gitea.token }}
|
|
SOURCE_RUN_ID: ${{ gitea.event.workflow_run.id }}
|
|
SOURCE_WORKFLOW: ${{ gitea.event.workflow.name }}
|
|
SOURCE_WORKFLOW_PATH: ${{ gitea.event.workflow_run.path }}
|
|
SOURCE_EVENT: ${{ gitea.event.workflow_run.event }}
|
|
SOURCE_CONCLUSION: ${{ gitea.event.workflow_run.conclusion }}
|
|
SOURCE_BRANCH: ${{ gitea.event.workflow_run.head_branch }}
|
|
SOURCE_SHA: ${{ gitea.event.workflow_run.head_sha }}
|
|
SOURCE_REPOSITORY: ${{ gitea.event.repository.full_name }}
|
|
run: |
|
|
if ! command -v gitea-api >/dev/null 2>&1; then
|
|
echo 'DRY-RUN only: gitea-api is unavailable in this job; artifact metadata and host handoff are not verified.'
|
|
python3 infra/deploy/release_handoff.py dry-run
|
|
exit 0
|
|
fi
|
|
if [[ -z ${GITEA_TOKEN:-} ]]; then
|
|
echo 'DRY-RUN only: GITEA_TOKEN is unavailable; artifact metadata and host handoff are not verified.'
|
|
python3 infra/deploy/release_handoff.py dry-run
|
|
exit 0
|
|
fi
|
|
metadata=$(mktemp)
|
|
trap 'rm -f "$metadata"' EXIT
|
|
gitea-api GET "/repos/admin/akyldash/actions/runs/${SOURCE_RUN_ID}/artifacts" > "$metadata"
|
|
python3 infra/deploy/release_handoff.py dry-run --artifact-metadata "$metadata"
|
|
- name: State that no deployment was performed
|
|
run: |
|
|
echo 'DEPLOYMENT STATUS: NOT DEPLOYED'
|
|
echo 'This workflow checks source provenance and may inspect artifact metadata only.'
|
|
echo 'It does not download the descriptor ZIP, open SSH, or invoke the Windows receiver.'
|
|
echo 'No Windows execution runner or automatic runtime binding has been verified.'
|