[chore] add logic to update our tests k8s versions #1
Workflow file for this run
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: Check for new k8s versions and update tests if needed | |
on: | |
pull_request: | |
#schedule: | |
# Run every Monday at noon. | |
# - cron: "0 12 * * 1" | |
#workflow_dispatch: | |
jobs: | |
check_and_update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Check for new k8s versions | |
id: check_for_update | |
run: | | |
echo "Checking for new k8s versions" | |
make update-k8s-test-versions | |
- name: check for changes | |
id: git-check | |
run: | | |
if git diff --quiet; then | |
echo "No changes detected, exiting workflow successfully" | |
exit 0 | |
fi | |
echo "changes=true" >> $GITHUB_OUTPUT | |
- name: Open PR for K8S Version Update | |
if: steps.git-check.outputs.changes == 'true' | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: Update K8S test versions | |
title: Update K8S versions used for testing | |
body: Use latest supported k8s kind versions | |
branch: update-k8s-test-versions | |
base: main | |
delete-branch: true |