Refactor the workflow to use shared variables ($GITHUB_OUTPUT) for version information, improving code maintainability and reducing redundancy. Changes: - Add version_base output to Fetch WordPress step (e.g., "6.9.1") - Add version_base output to Fetch Nginx step (e.g., "1.29.5") - Update values.yaml step to use shared variables - Reference steps.wordpress.outputs.version_base instead of parsing - Reference steps.wordpress.outputs.version (full tag) and steps.nginx.outputs.version - Update Increment chart version step - Use steps.wordpress.outputs.version_base directly for Chart.yaml version - Eliminate redundant parsing of values.yaml Benefits: 1. Single source of truth: Version extracted once in fetch steps 2. Reduced code complexity: Eliminate multiple sed/grep operations 3. Better maintainability: Changes to version format only need updating fetch steps 4. Clearer logic: Each step has clear responsibility 5. Improved reliability: Less error-prone than multiple parsing operations Version flow: 1. Fetch WordPress → outputs: version, version_base 2. Fetch Nginx → outputs: version, version_base 3. Update values.yaml → uses version (full tag) 4. Increment chart version → uses version_base Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
16 KiB
16 KiB