Update Kube Stack Version #8
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: # Allow manual triggering | |
jobs: | |
update-kube-stack-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.13' | |
- name: Set up Git configuration | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
- name: Run kube-stack version update script | |
run: | | |
cd scripts | |
python update_kube_stack_version.py --prepare-git | |
- name: Check for changes | |
id: verify-changed-files | |
run: | | |
# Check if there are commits ahead of the remote HEAD | |
REMOTE_HEAD=$(git ls-remote --symref origin HEAD | awk '/^ref:/ {print $2}' | sed 's|refs/heads/||') | |
COMMITS_AHEAD=$(git rev-list --count origin/$REMOTE_HEAD..HEAD) | |
if [ "$COMMITS_AHEAD" -gt 0 ]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
else | |
echo "changed=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Create Pull Request | |
if: steps.verify-changed-files.outputs.changed == 'true' | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "chore: update kube-stack version" | |
title: "chore: update kube-stack version" | |
body: | | |
This PR automatically updates the kube-stack version in `docset.yml` based on the latest version from the elastic-agent repository. | |
**Changes:** | |
- Updated kube-stack version in docset.yml | |
This PR was created automatically by the weekly kube-stack version update workflow. | |
branch: update-kube-stack-version-${{ github.run_id }} | |
delete-branch: true | |
labels: | | |
automated | |
documentation |