From c674eaba63db0a148508ba52bdf80efe24033f01 Mon Sep 17 00:00:00 2001 From: Corneil du Plessis Date: Wed, 3 Apr 2024 12:40:24 +0200 Subject: [PATCH] Fix reference to output --- .github/workflows/common.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 7f33f67f..fcebda4a 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -395,16 +395,16 @@ jobs: pushd stream-applications > /dev/null $ROOT_DIR/scan-folders.sh popd > /dev/null - if [ -f scan.sarif ]; then - echo "scan_file=$(realpath scan.sarif)" >> $GITHUB_OUTPUT + if [ -f "$ROOT_DIR/scan.sarif" ]; then + echo "scan_file=$ROOT_DIR/scan.sarif" >> $GITHUB_OUTPUT else echo "scan_file=" >> $GITHUB_OUTPUT fi - name: Upload Trivy scan results to GitHub Security tab - if: ${{ steps.scan.output.scan_file != null && steps.scan.output.scan_file != '' }} + if: ${{ steps.scan.outputs.scan_file != null && steps.scan.outputs.scan_file != '' }} uses: github/codeql-action/upload-sarif@v3 with: - sarif_file: '${{ steps.scan.output.scan_file }}' + sarif_file: '${{ steps.scan.outputs.scan_file }}' - name: Unit Test Report uses: dorny/test-reporter@v1 if: ${{ success() || failure() }} @@ -544,16 +544,16 @@ jobs: pushd stream-applications > /dev/null $ROOT_DIR/scan-folders.sh popd > /dev/null - if [ -f scan.sarif ]; then - echo "scan_file=$(realpath scan.sarif)" >> $GITHUB_OUTPUT + if [ -f "$ROOT_DIR/scan.sarif" ]; then + echo "scan_file=$ROOT_DIR/scan.sarif" >> $GITHUB_OUTPUT else echo "scan_file=" >> $GITHUB_OUTPUT fi - name: Upload Trivy scan results to GitHub Security tab - if: ${{ steps.scan.output.scan_file != null && steps.scan.output.scan_file != '' }} + if: ${{ steps.scan.outputs.scan_file != null && steps.scan.outputs.scan_file != '' }} uses: github/codeql-action/upload-sarif@v3 with: - sarif_file: '${{ steps.scan.output.scan_file }}' + sarif_file: '${{ steps.scan.outputs.scan_file }}' - name: 'Upload: Test Reports' if: ${{ always() }} uses: actions/upload-artifact@v3 @@ -694,16 +694,16 @@ jobs: pushd stream-applications > /dev/null $ROOT_DIR/scan-folders.sh popd > /dev/null - if [ -f scan.sarif ]; then - echo "scan_file=$(realpath scan.sarif)" >> $GITHUB_OUTPUT + if [ -f "$ROOT_DIR/scan.sarif" ]; then + echo "scan_file=$ROOT_DIR/scan.sarif" >> $GITHUB_OUTPUT else echo "scan_file=" >> $GITHUB_OUTPUT fi - name: Upload Trivy scan results to GitHub Security tab - if: ${{ steps.scan.output.scan_file != null && steps.scan.output.scan_file != '' }} + if: ${{ steps.scan.outputs.scan_file != null && steps.scan.outputs.scan_file != '' }} uses: github/codeql-action/upload-sarif@v3 with: - sarif_file: '${{ steps.scan.output.scan_file }}' + sarif_file: '${{ steps.scan.outputs.scan_file }}' - name: Unit Test Report uses: dorny/test-reporter@v1 if: ${{ success() || failure() }}