This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
Feature/ghactionstest #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check that PRs do not contain prereleaseSuffixes | |
on: | |
pull_request: | |
branches: | |
# TODO[FH]: remove before PR is merged. | |
- testmain | |
- master | |
jobs: | |
check-pr-does-not-contain-prereleasesuffixes-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: check if there are nonempty version suffixes in values.yaml | |
id: values_yaml_contains_version_suffix | |
uses: mikefarah/yq@master | |
with: | |
cmd: yq '[.secretsmanagement-operator.prereleaseSuffix, .secretsmanagement-operator.sidecarPrereleaseSuffix] | filter(.!=null and .!="") | length | . != "0"' charts/canvas-oda/values.yaml | |
- name: collect existing version suffixes in values.yaml for error reportfor | |
id: version_suffixes | |
if: steps.values_yaml_contains_version_suffix.outputs.result=='true' | |
uses: mikefarah/yq@master | |
with: | |
cmd: yq '[.secretsmanagement-operator.prereleaseSuffix, .secretsmanagement-operator.sidecarPrereleaseSuffix] | filter(.!=null and .!="") | join(", ")' charts/canvas-oda/values.yaml | |
- name: report error | |
if: steps.values_yaml_contains_version_suffix.outputs.result=='true' | |
run: | | |
echo "::error file=charts/canvas-oda/values.yaml::contains prereleaseSuffixes: [${{ steps.version_suffixes.outputs.result }}]" | |