-
Notifications
You must be signed in to change notification settings - Fork 1.5k
78 lines (64 loc) · 2.52 KB
/
Copy pathupdate-kubernetes-versions.yml
File metadata and controls
78 lines (64 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Update Kubernetes Versions
on:
schedule:
# Run once daily at 6am UTC
- cron: "0 6 * * *"
# Allow manual trigger
workflow_dispatch:
permissions: {}
jobs:
update-k8s-versions:
name: Check for new Kubernetes version
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC token from GitHub
environment:
name: main
steps:
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
id: octo-sts
with:
scope: DataDog/datadog-agent
policy: self.update-kubernetes-versions.create-pr
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: true
token: ${{ steps.octo-sts.outputs.token }}
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.11'
- name: Install dda
uses: ./.github/actions/install-dda
with:
features: legacy-tasks
- name: Install Python dependencies
run: pip install requests pyyaml
- name: Fetch latest Kubernetes version
id: fetch-versions
run: |
dda inv k8s-versions.fetch-versions
- name: Update e2e.yml with new version
id: update-yaml
if: steps.fetch-versions.outputs.has_new_versions == 'true'
run: |
dda inv k8s-versions.update-e2e-yaml
- 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-automated
token: ${{ steps.octo-sts.outputs.token }}
sign-commits: true
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