Skip to content

synchronize configuration files #216

synchronize configuration files

synchronize configuration files #216

Workflow file for this run

# Copyright 2024 CS Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Generate Helm documentation
on:
- pull_request
jobs:
generate:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Get the rs-server version tag
id: get_version
shell: bash
run: |
# Enable pipefail so git command failures do not result in null versions downstream
set -x
echo "APP_VERSION=$(\
git ls-remote --tags --refs --sort="v:refname" \
https://github.com/RS-PYTHON/rs-server.git 'v0.*a*' | tail -n1 | sed 's/.*\///' \
)" >> $GITHUB_OUTPUT
echo "CHART_VERSION=0.$(\
git ls-remote --tags --refs --sort="v:refname" \
https://github.com/RS-PYTHON/rs-server.git 'v0.*a*' | tail -n1 | sed 's/.*\///' | sed 's/^v//' | sed 's/.\{3\}/&-/' \
)" >> $GITHUB_OUTPUT
- name: Update version number in chart.yaml
shell: bash
run: |
for chart in $(find charts -name Chart.yaml); do
sed -i "s,{{APP_VERSION}},${{ steps.get_version.outputs.APP_VERSION }}," $chart
sed -i "s,{{CHART_VERSION}},${{ steps.get_version.outputs.CHART_VERSION }}," $chart
done
- name: Run helm-docs
uses: losisin/[email protected]
with:
git-push: true
chart-search-root: ./charts