mirror of
https://github.com/bitnami/charts.git
synced 2026-08-10 14:15:55 +08:00
[bitnami/*] ci: 👷 Skip ci-pipeline workflow if the changes are only in markdown files (#10969)
* [bitnami/*] ci: 👷 Skip ci-pipeline workflow if the changes are only in markdown files Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * ci: 👷 Add chart to cd-pipeline Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * fix: ⏪ Revert adding matomo to the cd-pipeline workflow Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * docs: 📝 Update Pull Request Template It specifies that the changes in the Chart.yaml are not mandatory for simple README.md changes. Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
|
||||
<!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] -->
|
||||
|
||||
- [ ] Chart version bumped in `Chart.yaml` according to [semver](http://semver.org/).
|
||||
- [ ] Chart version bumped in `Chart.yaml` according to [semver](http://semver.org/). This is *not necessary* when the changes only affect README.md files.
|
||||
- [ ] Variables are documented in the values.yaml and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm)
|
||||
- [ ] Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
|
||||
- [ ] All commits signed off and in agreement of [Developer Certificate of Origin (DCO)](https://github.com/bitnami/charts/blob/master/CONTRIBUTING.md#sign-your-work)
|
||||
|
||||
@@ -44,9 +44,13 @@ jobs:
|
||||
# Using grep -c as a better alternative to wc -l when dealing with empty strings."
|
||||
num_charts_changed="$(echo "$charts_dirs_changed" | grep -c "bitnami" || true)"
|
||||
num_version_bumps="$(echo "$files_changed_data" | jq -r '[.[] | select(.filename|endswith("Chart.yaml")) | select(.patch|contains("+version")) ] | length' )"
|
||||
non_readme_files=$(echo "$files_changed" | grep -vc "\.md" || true)
|
||||
|
||||
if [[ ${{ github.event.action }} = "synchronize" && ${{ github.actor }} = "bitnami-bot" && "$latest_commit_message" == *"readme-generator-for-helm"* ]]; then
|
||||
echo "::set-output name=result::skip"
|
||||
elif [[ "$non_readme_files" -le "0" ]]; then
|
||||
# The only changes are .md files -> SKIP
|
||||
echo "::set-output name=result::skip"
|
||||
elif [[ "$num_charts_changed" -ne "$num_version_bumps" ]]; then
|
||||
# Changes done in charts but version not bumped -> ERROR
|
||||
echo "::set-output name=error::Detected changes in charts without version bump in Chart.yaml.\nCharts changed: ${num_charts_changed}\n${charts_dirs_changed}\nVersion bumps detected: ${num_version_bumps}"
|
||||
|
||||
Reference in New Issue
Block a user