Skip to content

Commit

Permalink
automating k8s versions upgrade in tests with each gk release
Browse files Browse the repository at this point in the history
  • Loading branch information
JaydipGabani committed Dec 11, 2024
1 parent 9ab6f6c commit 0474830
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ jobs:
fi
done
make version-docs NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x TAG=v${TAG} OPA_VERSIONS="${versions}"
# Fetch the latest 3 GA Kubernetes versions and double-quote them
k8s_versions=$(curl -s https://api.github.com/repos/kubernetes/kubernetes/releases \
| jq -r '[.[] | select(.prerelease == false) | .tag_name] | map(select(test("^v[0-9]+\\.[0-9]+\\.[0-9]+$"))) | .[:3] | map(ltrimstr("v")) | map("\"" + . + "\"") | join(", ")')
# Update the workflow.yaml file with the latest versions
sed -i "s/KUBERNETES_VERSION: \[.*\]/KUBERNETES_VERSION: \[$latest_versions\]/" workflow.yaml
- name: Create release pull request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
Expand Down

0 comments on commit 0474830

Please sign in to comment.