Skip to content

Use GITHUB_TOKEN for testing instead of OIDC #2

Use GITHUB_TOKEN for testing instead of OIDC

Use GITHUB_TOKEN for testing instead of OIDC #2

name: Update Kubernetes Versions
on:
schedule:
# Run twice daily at 6am and 6pm UTC
- cron: "0 6,18 * * *"
# Allow manual trigger
workflow_dispatch:
# Temporary: trigger on push for testing
push:
branches:
- frank.spano/CONTINT-4708-2
permissions: {}
jobs:
update-k8s-versions:
name: Check for new Kubernetes version
runs-on: ubuntu-latest
permissions:
contents: write # For creating branches and commits
pull-requests: write # For creating PRs
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: true
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install requests pyyaml
- name: Fetch latest Kubernetes version
id: fetch-versions
run: |
python .github/scripts/fetch_k8s_versions.py
- name: Update e2e.yml with new version
id: update-yaml
if: steps.fetch-versions.outputs.has_new_versions == 'true'
run: |
python .github/scripts/update_e2e_yaml.py
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
name: Create pull request
if: steps.update-yaml.outputs.updated == 'true'
with:
commit-message: "chore(e2e): add new Kubernetes version to e2e tests"
branch: update-k8s-versions-${{ github.run_id }}-${{ github.run_attempt }}
title: "[automated] Add new Kubernetes version to e2e tests"
body: |
### What does this PR do?
Adds the latest Kubernetes version from kindest/node to the e2e test matrix.
### Motivation
Keep e2e tests running against the latest Kubernetes version to ensure compatibility.
### New version added:
${{ steps.update-yaml.outputs.new_versions }}
### Describe how you validated your changes
CI will validate the new versions work correctly.
team-reviewers: container-integrations
labels: team/container-integrations,qa/done,changelog/no-changelog,ask-review