Skip to content

ci: run alpha workflow with values-digest.yaml file (#3874) #881

ci: run alpha workflow with values-digest.yaml file (#3874)

ci: run alpha workflow with values-digest.yaml file (#3874) #881

# Copy files to the gh-pages branch to have clean and shorter links.
# Example: https://helm.camunda.io/camunda-platform/values/values-latest.yaml
name: "Chart - Public Files"
on:
push:
branches:
- main
paths:
- '.github/workflows/chart-public-files.yaml'
- 'charts/camunda-platform*/values*.yaml'
- 'scripts/templates/version-matrix/*'
- 'version-matrix/**'
workflow_dispatch: { }
permissions:
contents: read
jobs:
copy-files:
name: Copy chart public files
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: gh-pages
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
path: main
- name: Copy values files
run: |
# Copy values files to the camunda-platform/values directory.
copy_chart_file() {
file_name="$1";
if [ -f ${chart_id}/${file_name} ]; then
cp -a ${chart_id}/${file_name} ${camunda_values_dir}/${file_name};
echo "Copied ${file_name} file for Camunda ${camunda_version} chart";
else
echo "No ${file_name} file for Camunda ${camunda_version} chart";
fi
}
#
# Legacy - Extra values for all chart versions.
# This is considered legacy as the version is part of the file name which should not be the case.
# Hence, the structure is kept for backward compatibility.
find main/charts -name "camunda-platform-8*" | sort -n | while read chart_id; do
camunda_version="$(echo ${chart_id} | cut -d '-' -f 3)";
# Latest values files.
cp -a ${chart_id}/values-latest.yaml camunda-platform/values/values-v${camunda_version}.yaml;
done
#
# Extra values for all chart versions.
# This structure is preferred as the version is part of the directory name not the file name.
# Which makes it easier to manage in the docs. Which also used in the version matrix.
find main/charts -name "camunda-platform-8*" | sort -n | while read chart_id; do
camunda_version="$(echo ${chart_id} | cut -d '-' -f 3)";
camunda_values_dir="camunda-platform/values/camunda-${camunda_version}";
mkdir -p "${camunda_values_dir}";
# Latest values files.
cp -a ${chart_id}/values-latest.yaml ${camunda_values_dir}/values-latest.yaml;
# Local values files.
copy_chart_file values-local.yaml
# Enterprise values files.
copy_chart_file values-enterprise.yaml
done
- name: Copy version matrix files
run: |
mkdir -p camunda-platform/version-matrix
cp -a main/version-matrix/* camunda-platform/version-matrix/
echo "Copied version matrix files to camunda-platform/version-matrix/"
- name: Clean up
run: |
rm -rf main
find .
- uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
message: "chore: update camunda-platform public files"