11name : Release Validation (Dry Run)
2+ # This workflow calls the centralized validation process from the template project
23
34on :
45 pull_request :
2526 - patch
2627 - minor
2728 - major
29+ python :
30+ description : ' Python package validation'
31+ required : false
32+ default : ' auto'
33+ type : choice
34+ options :
35+ - auto
36+ - force
37+ - skip
38+ docker :
39+ description : ' Docker image validation'
40+ required : false
41+ default : ' auto'
42+ type : choice
43+ options :
44+ - auto
45+ - force
46+ - skip
47+ docs :
48+ description : ' Documentation validation'
49+ required : false
50+ default : ' auto'
51+ type : choice
52+ options :
53+ - auto
54+ - force
55+ - skip
2856
2957permissions :
3058 contents : read
@@ -36,119 +64,62 @@ concurrency:
3664 cancel-in-progress : true
3765
3866jobs :
39- # Parse project configuration from intent.yaml
40- config :
41- name : Parse Configuration
42- uses : Chisanan232/Template-Python-UV-Project/.github/workflows/rw_parse_project_config.yaml@master
43-
44- intent-parse :
45- uses : Chisanan232/Template-Python-UV-Project/.github/workflows/rw_parse_release_intent.yaml@master
46- needs : config
47- with :
48- level : ${{ inputs.level || needs.config.outputs.level }}
49- python : ${{ needs.config.outputs.python }}
50- docker : ${{ needs.config.outputs.docker }}
51- docs : ${{ needs.config.outputs.docs }}
52- notes : ' Validation test run'
53-
54- build_git-tag_and_create_github-release :
55- uses : Chisanan232/Template-Python-UV-Project/.github/workflows/rw_build_git-tag_and_create_github-release_v2.yaml@master
56- needs : [config, intent-parse]
57- with :
58- version : ${{ needs.config.outputs.validation_version }} # Test version for validation
59- debug_mode : true
60- secrets :
61- github_auth_token : ${{ secrets.GITHUB_TOKEN }}
62-
63- python-build-check :
64- uses : ./.github/workflows/rw_python_package.yaml
65- needs : [config, build_git-tag_and_create_github-release]
66- with :
67- operation : ' test'
68- artifact-name : ' validation-python-package'
69-
70- docker-build-dockerhub :
71- name : Validate DockerHub Build
72- uses : Chisanan232/Template-Python-UV-Project/.github/workflows/rw_docker_operations.yaml@master
73- needs : [config, build_git-tag_and_create_github-release]
67+ # Call the centralized complete validation workflow
68+ validation :
69+ name : Complete Release Validation Process
70+ uses : Chisanan232/Template-Python-UV-Project/.github/workflows/rw_release_validation_complete.yaml@master
7471 with :
75- operation : ' test'
76- registry : ${{ needs.config.outputs.docker_registry_dockerhub }}
77- image-name : ${{ github.repository }}
78- version : ${{ needs.config.outputs.validation_test_version }}
79- health-check-port : ${{ needs.config.outputs.docker_health_check_port }}
80- health-check-path : ${{ needs.config.outputs.docker_health_check_path }}
81- enable-signing : true
82- docker-run-options : ${{ needs.config.outputs.docker_run_options }}
83-
84- docker-build-ghcr :
85- name : Validate GHCR Build
86- uses : Chisanan232/Template-Python-UV-Project/.github/workflows/rw_docker_operations.yaml@master
87- needs : [config, build_git-tag_and_create_github-release]
88- with :
89- operation : ' test'
90- registry : ${{ needs.config.outputs.docker_registry_ghcr }}
91- image-name : ${{ github.repository }}
92- version : ${{ needs.config.outputs.validation_test_version }}
93- health-check-port : ${{ needs.config.outputs.docker_health_check_port }}
94- health-check-path : ${{ needs.config.outputs.docker_health_check_path }}
95- enable-signing : true
96- docker-run-options : ${{ needs.config.outputs.docker_run_options }}
97-
98- docs-build :
99- uses : Chisanan232/Template-Python-UV-Project/.github/workflows/rw_docs_operations.yaml@master
100- needs : [config, intent-parse]
101- with :
102- operation : ' test'
103- upload-artifacts : true
104-
105- supply-chain-loopback :
106- name : Security Scan (Supply Chain)
107- uses : Chisanan232/Template-Python-UV-Project/.github/workflows/rw_docker_operations.yaml@master
108- needs : [config, docker-build-dockerhub, docker-build-ghcr]
109- with :
110- operation : ' security-scan'
111- registry : ${{ needs.config.outputs.docker_registry_dockerhub }} # Use DockerHub build for security scan
112- image-name : ${{ github.repository }}
113- version : ${{ needs.config.outputs.validation_test_version }}
114- enable-sbom : true
115- enable-signing : true
116- docker-run-options : ${{ needs.config.outputs.docker_run_options }}
72+ level : ${{ inputs.level }}
73+ python : ${{ inputs.python }}
74+ docker : ${{ inputs.docker }}
75+ docs : ${{ inputs.docs }}
11776
77+ # Summary job to report results
11878 validation-summary :
11979 name : Validation Summary
12080 runs-on : ubuntu-latest
121- needs : [config, intent-parse, python-build-check, docker-build-dockerhub, docker-build-ghcr, docs-build, supply-chain-loopback]
81+ needs : validation
12282 if : always()
12383 steps :
124- - name : Check validation results
84+ - name : Report validation results
12585 run : |
12686 echo "=== Release Validation Summary ==="
12787 echo ""
128- echo "Intent Parsing : ${{ needs.intent-parse .result }}"
129- echo "Python Build: ${{ needs.python-build-check.result }}"
130- echo "DockerHub Build: ${{ needs.docker-build-dockerhub.result }}"
131- echo "GHCR Build: ${{ needs.docker-build-ghcr.result }}"
132- echo "Docs Build : ${{ needs.docs-build.result }}"
133- echo "Supply Chain : ${{ needs.supply-chain-loopback.result }}"
88+ echo "Validation Status : ${{ needs.validation .result }}"
89+ echo "Python Build: ${{ needs.validation.outputs.python_validated }}"
90+ echo "Docker Build: ${{ needs.validation.outputs.docker_validated }}"
91+ echo "Docs Build: ${{ needs.validation.outputs.docs_validated }}"
92+ echo "Security Scan : ${{ needs.validation.outputs.security_validated }}"
93+ echo "Test Version : ${{ needs.validation.outputs.test_version }}"
13494 echo ""
13595
136- if [[ "${{ needs.intent-parse.result }}" == "success" && \
137- "${{ needs.python-build-check.result }}" == "success" && \
138- "${{ needs.docker-build-dockerhub.result }}" == "success" && \
139- "${{ needs.docker-build-ghcr.result }}" == "success" && \
140- "${{ needs.docs-build.result }}" == "success" && \
141- "${{ needs.supply-chain-loopback.result }}" == "success" ]]; then
96+ if [[ "${{ needs.validation.result }}" == "success" && "${{ needs.validation.outputs.validation_passed }}" == "true" ]]; then
14297 echo "✅ All validation checks passed! Release process is ready."
14398 echo ""
144- echo "Release Configuration:"
145- echo "- Do Release: ${{ needs.intent-parse.outputs.do_release }}"
146- echo "- Level: ${{ needs.intent-parse.outputs.level }}"
147- echo "- Python: ${{ needs.intent-parse.outputs.python }}"
148- echo "- Docker: ${{ needs.intent-parse.outputs.docker }}"
149- echo "- Docs: ${{ needs.intent-parse.outputs.docs }}"
150- echo "- Notes: ${{ needs.intent-parse.outputs.notes }}"
99+ echo "Validation Configuration:"
100+ echo "- Release Intent: ${{ needs.validation.outputs.do_release }}"
101+ echo "- Level: ${{ needs.validation.outputs.level }}"
102+ echo "- Python: ${{ needs.validation.outputs.python }}"
103+ echo "- Docker: ${{ needs.validation.outputs.docker }}"
104+ echo "- Docs: ${{ needs.validation.outputs.docs }}"
105+ echo "- Test Version: ${{ needs.validation.outputs.test_version }}"
106+ echo ""
107+ echo "🚀 The release workflows are ready to deploy!"
151108 else
152109 echo "❌ Some validation checks failed. Please review the logs above."
110+ echo ""
111+ echo "Failed validations need to be addressed before release:"
112+ if [[ "${{ needs.validation.outputs.python_validated }}" != "true" ]]; then
113+ echo "- Python package build/test failed"
114+ fi
115+ if [[ "${{ needs.validation.outputs.docker_validated }}" != "true" ]]; then
116+ echo "- Docker image build/test failed"
117+ fi
118+ if [[ "${{ needs.validation.outputs.docs_validated }}" != "true" ]]; then
119+ echo "- Documentation build/test failed"
120+ fi
121+ if [[ "${{ needs.validation.outputs.security_validated }}" != "true" ]]; then
122+ echo "- Security scan failed"
123+ fi
153124 exit 1
154125 fi
0 commit comments