Skip to content

Commit

Permalink
Merge pull request #799 from stakater/chart-rel-1.2.0
Browse files Browse the repository at this point in the history
Update helm chart - 1.2.0
  • Loading branch information
MuneebAijaz authored Nov 20, 2024
2 parents e9811bf + 22f6c3e commit ca09e24
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 74 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/pull_request-helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Pull Request Workflow for Helm Chart changes

on:
pull_request:
branches:
- master
paths:
- 'deployments/kubernetes/chart/reloader/**'

env:
DOCKER_FILE_PATH: Dockerfile
DOCKER_UBI_FILE_PATH: Dockerfile.ubi
KUBERNETES_VERSION: "1.30.0"
KIND_VERSION: "0.23.0"
REGISTRY: ghcr.io

jobs:

helm-validation:
permissions:
contents: read

runs-on: ubuntu-latest
name: Helm Chart Validation

steps:

- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.sha}}
fetch-depth: 0

# Setting up helm binary
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.11.3

- name: Helm chart unit tests
uses: d3adb5/helm-unittest-action@v2
with:
charts: deployments/kubernetes/chart/reloader

- name: Add Stakater Helm Repo
run: |
helm repo add stakater https://stakater.github.io/stakater-charts
- name: Get version for chart from helm repo
id: chart_eval
run: |
current_chart_version=$(helm search repo stakater/reloader | tail -n 1 | awk '{print $2}')
echo "CURRENT_CHART_VERSION=$(echo ${current_chart_version})" >> $GITHUB_OUTPUT
- name: Get Updated Chart version from Chart.yaml
uses: mikefarah/yq@master
id: new_chart_version
with:
cmd: yq e '.version' deployments/kubernetes/chart/reloader/Chart.yaml

- name: Check Version
uses: aleoyakas/check-semver-increased-action@v1
id: check-version
with:
current-version: ${{ steps.new_chart_version.outputs.result }}
previous-version: ${{ steps.chart_eval.outputs.CURRENT_CHART_VERSION }}

- name: Fail if Helm Chart version isnt updated
if: steps.check-version.outputs.is-version-increased != 'true'
run: |
echo "Helm Chart Version wasnt updated"
exit 1
72 changes: 2 additions & 70 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Request
name: Pull Request Workflow for Code changes

on:
pull_request:
Expand All @@ -14,6 +14,7 @@ on:
- '!docs/**'
- '!theme_common'
- '!theme_override'
- '!deployments/kubernetes/chart/reloader/**'

env:
DOCKER_FILE_PATH: Dockerfile
Expand Down Expand Up @@ -162,72 +163,3 @@ jobs:
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Check if Helm validation needs to run
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
chart:
- 'deployments/kubernetes/chart/reloader/**'
outputs:
helm_chart_changed: ${{ steps.filter.outputs.chart }}

helm-validation:
permissions:
contents: read

runs-on: ubuntu-latest
name: Helm Chart Validation
needs:
- build

if: ${{ needs.build.outputs.helm_chart_changed }} == "true"
steps:

- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.sha}}
fetch-depth: 0

# Setting up helm binary
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.11.3

- name: Helm chart unit tests
uses: d3adb5/helm-unittest-action@v2
with:
charts: deployments/kubernetes/chart/reloader

- name: Add Stakater Helm Repo
run: |
helm repo add stakater https://stakater.github.io/stakater-charts
- name: Get version for chart from helm repo
id: chart_eval
run: |
current_chart_version=$(helm search repo stakater/reloader | tail -n 1 | awk '{print $2}')
echo "CURRENT_CHART_VERSION=$(echo ${current_chart_version})" >> $GITHUB_OUTPUT
- name: Get Updated Chart version from Chart.yaml
uses: mikefarah/yq@master
id: new_chart_version
with:
cmd: yq e '.version' deployments/kubernetes/chart/reloader/Chart.yaml

- name: Check Version
uses: aleoyakas/check-semver-increased-action@v1
id: check-version
with:
current-version: ${{ steps.new_chart_version.outputs.result }}
previous-version: ${{ steps.chart_eval.outputs.CURRENT_CHART_VERSION }}

- name: Fail if Helm Chart version isnt updated
if: steps.check-version.outputs.is-version-increased != 'true'
run: |
echo "Helm Chart Version wasnt updated"
exit 1
4 changes: 2 additions & 2 deletions deployments/kubernetes/chart/reloader/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
apiVersion: v1
name: reloader
description: Reloader chart that runs on kubernetes
version: 1.1.1
appVersion: v1.1.0
version: 1.2.0
appVersion: v1.2.0
keywords:
- Reloader
- kubernetes
Expand Down
4 changes: 2 additions & 2 deletions deployments/kubernetes/chart/reloader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ reloader:
labels:
provider: stakater
group: com.stakater.platform
version: v1.1.0
version: v1.2.0
image:
name: ghcr.io/stakater/reloader
base: stakater/reloader
tag: v1.1.0
tag: v1.2.0
pullPolicy: IfNotPresent
# Support for extra environment variables.
env:
Expand Down

0 comments on commit ca09e24

Please sign in to comment.