Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Feature/ghactionstest #8

Feature/ghactionstest

Feature/ghactionstest #8

Workflow file for this run

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: show result
run: echo "result=${{ steps.values_yaml_contains_version_suffix.outputs.result }}"
- 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"

Check failure on line 32 in .github/workflows/check-PR.yml

View workflow run for this annotation

GitHub Actions / Check that PRs do not contain prereleaseSuffixes

Invalid workflow file

The workflow is not valid. .github/workflows/check-PR.yml (Line: 32, Col: 13): Unexpected symbol: '"true"'. Located at position 59 within expression: steps.values_yaml_contains_version_suffix.outputs.result=="true"
run: |
echo "::error::values.yaml contains prereleaseSuffixes: [${{ steps.version_suffixes.outputs.result }}]" && exit 1