Update Kube Stack Version #11
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: Update Kube Stack Version | |
| on: | |
| schedule: | |
| # Run every Monday at 9:00 AM UTC | |
| - cron: '0 9 * * 1' | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: 'Dry run (check for updates without creating PR)' | |
| required: false | |
| default: false | |
| type: boolean | |
| jobs: | |
| update-kube-stack-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests | |
| - name: Run update script | |
| id: update-script | |
| run: | | |
| echo "Running version update script (kube-stack-version and helm-version)..." | |
| python scripts/update_kube_stack_version.py | |
| echo "Script completed successfully" | |
| - name: Check for changes | |
| id: check-changes | |
| run: | | |
| if git diff --quiet HEAD -- docset.yml; then | |
| echo "No changes detected in docset.yml" | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Changes detected in docset.yml" | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| # Show the diff for logging | |
| echo "Changes:" | |
| git diff HEAD -- docset.yml | |
| fi | |
| - name: Create Pull Request | |
| if: steps.check-changes.outputs.has_changes == 'true' && github.event.inputs.dry_run != 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore: update kube-stack-version and helm-version' | |
| title: 'chore: update kube-stack-version and helm-version' | |
| body: | | |
| This PR automatically updates the `kube-stack-version` and `helm-version` in `docset.yml` based on the latest versions from the Kibana and Elastic Agent repositories. | |
| **Changes:** | |
| - Updated `kube-stack-version` to the latest value from the Kibana repository | |
| - Updated `helm-version` to the latest value from the Elastic Agent repository | |
| **Generated by:** [Update Kube Stack Version workflow](https://github.com/${{ github.repository }}/actions/workflows/update-kube-stack-version.yml) | |
| This is an automated update. Please review the changes before merging. | |
| branch: update-kube-stack-version | |
| delete-branch: true | |
| team-reviewers: | | |
| ingest-docs | |
| labels: | | |
| automated | |
| chore | |
| kube-stack-version | |
| - name: Dry run summary | |
| if: github.event.inputs.dry_run == 'true' | |
| run: | | |
| echo "## Dry Run Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| if [ "${{ steps.check-changes.outputs.has_changes }}" == "true" ]; then | |
| echo "✅ **Changes detected** - A PR would be created in a real run" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Changes that would be made:**" >> $GITHUB_STEP_SUMMARY | |
| echo '```diff' >> $GITHUB_STEP_SUMMARY | |
| git diff HEAD -- docset.yml >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "ℹ️ **No changes needed** - kube-stack-version and helm-version are already up to date" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| - name: Summary | |
| if: github.event.inputs.dry_run != 'true' | |
| run: | | |
| echo "## Update Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| if [ "${{ steps.check-changes.outputs.has_changes }}" == "true" ]; then | |
| echo "✅ **PR Created** - Changes detected and pull request created" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "ℹ️ **No changes needed** - kube-stack-version and helm-version are already up to date" >> $GITHUB_STEP_SUMMARY | |
| fi |