Skip to content

Commit 6533f38

Browse files
committed
Use yq To Parse Scanner Version From Chart.yaml
The previous solution was prone to quotationmarks wrapping the version number. Using `yq` will resolve this Signed-off-by: Yannik Fuhrmeister <yannik.fuhrmeister@iteratec.com>
1 parent 45172eb commit 6533f38

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,11 @@ jobs:
341341
uses: actions/checkout@v2
342342

343343
- name: Set ENV Var with Scanner Version
344+
uses: mikefarah/yq@v4.4.1
344345
# Notice: The current version of the scanner is provided via the Chart.yaml to ensure
345346
# there is only one place to edit the version of a scanner
346-
run: |
347-
cd scanners/${{ matrix.scanner }}
348-
echo "scannerVersion=$(cat Chart.yaml | grep appVersion | cut -d" " -f2)" >> $GITHUB_ENV
347+
with:
348+
cmd: echo scannerVersion=$(yq e .appVersion scanners${{ matrix.scanner }}/Chart.yaml) >> $GITHUB_ENV
349349

350350
- name: Docker Meta
351351
id: docker_meta

0 commit comments

Comments
 (0)