Refine release train workflows #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test - Spring Release Train Project Ready | |
| on: | |
| push: | |
| paths: | |
| - '.github/actions/spring-release-train-project-ready/**' | |
| - '.github/workflows/test-spring-release-train-project-ready.yml' | |
| pull_request: | |
| paths: | |
| - '.github/actions/spring-release-train-project-ready/**' | |
| - '.github/workflows/test-spring-release-train-project-ready.yml' | |
| jobs: | |
| # ── Validate action.yml structure ─────────────────────────────────────────── | |
| validate-action-yaml: | |
| name: Validate action.yml | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify action.yml is valid YAML and has required fields | |
| run: | | |
| python3 - << 'EOF' | |
| import yaml, sys | |
| with open('.github/actions/spring-release-train-project-ready/action.yml') as f: | |
| action = yaml.safe_load(f) | |
| required_inputs = {'project', 'project-version', 'spring-cloud-release-train-version', 'spring-release-train-version', 'token'} | |
| actual_inputs = set(action.get('inputs', {}).keys()) | |
| missing = required_inputs - actual_inputs | |
| if missing: | |
| print(f'❌ Missing required inputs: {missing}') | |
| sys.exit(1) | |
| assert action['runs']['using'] == 'composite', 'Action must use composite runner' | |
| step_names = [s.get('name', '') for s in action['runs']['steps']] | |
| print('Steps found:') | |
| for name in step_names: | |
| print(f' - {name}') | |
| expected_steps = [ | |
| 'Checkout project release branch', | |
| 'Update project versions', | |
| 'Verify no snapshot versions', | |
| 'Commit and push release version changes', | |
| 'Trigger release-train-ready workflow', | |
| ] | |
| for expected in expected_steps: | |
| if expected not in step_names: | |
| print(f'❌ Missing expected step: {expected}') | |
| sys.exit(1) | |
| print('✅ action.yml is valid and contains all required inputs and steps') | |
| EOF |