billing-service/.github/workflows/release-traceability.yml
Haitao Pan 78255baec1
Codex/multi node billing ingestion (#4)
* feat: add multi-source billing ingestion

* Move release traceability workflow logic into scripts

* feat: release traceability

---------

Co-authored-by: Haitao Pan <manbuzhe2009@qq.com>
2026-04-12 15:44:42 +08:00

54 lines
1.7 KiB
YAML

name: release-traceability
on:
push:
branches:
- main
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
outputs:
service_image_ref: ${{ steps.meta.outputs.service_image_ref }}
service_image_tag: ${{ steps.meta.outputs.service_image_tag }}
service_image_commit: ${{ steps.meta.outputs.service_image_commit }}
steps:
- uses: actions/checkout@v4
- name: Derive image identity
id: meta
run: bash ./scripts/github-actions/resolve-service-image-ref.sh
- name: Build image
env:
SERVICE_IMAGE_REF: ${{ steps.meta.outputs.service_image_ref }}
SERVICE_IMAGE_LATEST_REF: ghcr.io/${{ github.repository }}:latest
run: bash ./scripts/github-actions/build-service-image.sh
- name: Push image
run: bash ./scripts/github-actions/push-image-placeholder.sh
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Deploy via playbook
env:
IMAGE_REF: ${{ needs.build.outputs.service_image_ref }}
BILLING_SERVICE_IMAGE_REF: ${{ needs.build.outputs.service_image_ref }}
BILLING_SERVICE_IMAGE_TAG: ${{ needs.build.outputs.service_image_tag }}
BILLING_SERVICE_IMAGE_COMMIT: ${{ needs.build.outputs.service_image_commit }}
run: bash ./scripts/github-actions/deploy-billing-service.sh
validate:
runs-on: ubuntu-latest
needs: deploy
steps:
- name: Validate runtime traceability
env:
SERVICE_IMAGE_REF: ${{ needs.build.outputs.service_image_ref }}
run: bash ./scripts/github-actions/validate-release-traceability.sh