Skip to content

Commit

Permalink
Merge branch 'nginxinc:main' into feat/access-log-5625
Browse files Browse the repository at this point in the history
  • Loading branch information
hafe committed Aug 6, 2024
2 parents a009849 + f75c815 commit 5cdff87
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/scripts/exclude_ci_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@
.github/workflows/stale.yml
.github/workflows/update-docker-images.yml
.github/workflows/update-docker-sha.yml
.github/workflows/update-kubernetes-version.yml
.github/workflows/updates-notification.yml
.github/workflows/version-bump.yml
55 changes: 55 additions & 0 deletions .github/workflows/update-kubernetes-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Update Kubernetes version in Helm chart
on:
push:
branches:
- main
- release-*
paths:
- tests/Dockerfile

concurrency:
group: ${{ github.ref_name }}-k8s-version
cancel-in-progress: true

permissions:
contents: read

jobs:
update-k8s-version:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Get current k8s version from Kind image
id: k8s-version
run: |
v=$(grep kindest tests/Dockerfile | cut -d ':' -f 2 | cut -d '@' -f 1)
echo "version=${v}" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
- name: Search for the version in the schema file
id: search
run: |
found="false"
if grep -q ${{ steps.k8s-version.outputs.version }} charts/nginx-ingress/values.schema.json; then
found="true"
fi
echo "found=$found" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
- name: Replace version in Helm schema file
run: |
sed -i -e "s#/v[0-9]\+\.[0-9]\+\.[0-9]\+/_definitions.json#/${{ steps.k8s-version.outputs.version }}/_definitions.json#" charts/nginx-ingress/values.schema.json
if: ${{ steps.search.outputs.found == 'false' }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
token: ${{ secrets.NGINX_PAT }}
commit-message: update kubernetes version to ${{ steps.k8s-version.outputs.version }} in helm schema
title: update kubernetes version to ${{ steps.k8s-version.outputs.version }} in helm schema
branch: chore/k8s-${{ steps.k8s-version.outputs.version }}
author: nginx-bot <integrations@nginx.com>
body: |
This automated PR updates the helm schema k8s version to ${{ steps.k8s-version.outputs.version }}.
if: ${{ steps.search.outputs.found == 'false' }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black

Expand Down

0 comments on commit 5cdff87

Please sign in to comment.