mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-10 09:55:31 +02:00
Modified sed usage in Helm chart release workflow to account for dependencies section present in Chart.yaml Unify usage of sed across Helm chart release workflow
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
name: Release Helm chart
|
|
|
|
# Run this workflow manually
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
chartVersion:
|
|
description: "Helm chart version to release. eg. 0.4.1"
|
|
required: true
|
|
appVersion:
|
|
description: "Operator app version without quotes, eg. 0.5.1 . If not provided, the one in Chart.yaml won't be overwritten."
|
|
required: false
|
|
|
|
jobs:
|
|
release-helm-chart:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Deploy Helm chart
|
|
run: |
|
|
sed -i '0,/version:.*/s//version: ${{ github.event.inputs.chartVersion }}/' chart/jenkins-operator/Chart.yaml
|
|
|
|
if [ ${{ github.event.inputs.appVersion }} ] ; then
|
|
sed -i '/appVersion:.*/s//appVersion: "${{ github.event.inputs.appVersion }}"/' chart/jenkins-operator/Chart.yaml
|
|
fi
|
|
|
|
make helm-release-latest
|
|
|
|
# Creates pull request with new chart version
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v3
|
|
with:
|
|
commit-message: Release Helm chart ${{ github.event.inputs.chartVersion }}
|
|
branch: helm-chart-release-${{ github.event.inputs.chartVersion }}
|
|
title: Release ${{ github.event.inputs.chartVersion }} Helm Chart
|
|
body: |
|
|
Release ${{ github.event.inputs.chartVersion }} Helm Chart |