From 9c8e636ac7ba78e9a01b1c0cf70c41ba6825e001 Mon Sep 17 00:00:00 2001 From: Guy Owen Date: Tue, 10 Sep 2024 14:46:20 +1000 Subject: [PATCH] [291] Fixed variable assignment. --- .github/workflows/vulnerability-scan.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/vulnerability-scan.yml b/.github/workflows/vulnerability-scan.yml index 54f440f1..01686e81 100644 --- a/.github/workflows/vulnerability-scan.yml +++ b/.github/workflows/vulnerability-scan.yml @@ -35,17 +35,23 @@ jobs: run: echo "matrix=$MATRIX" >> $GITHUB_OUTPUT outputs: matrix: ${{ steps.setup-matrix.outputs.matrix }} - vulnerability-scan: + set-sha-ref: runs-on: ubuntu-latest - needs: setup-matrix - strategy: - matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} steps: - name: checkout id: checkout uses: actions/checkout@main with: ref: ${{ github.event.inputs.tag }} + outputs: + ref: ${{ steps.checkout.outputs.ref }} + commit: ${{ steps.checkout.outputs.commit }} + vulnerability-scan: + runs-on: ubuntu-latest + needs: [setup-matrix, set-sha-ref] + strategy: + matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} + steps: - name: Scan for vulnerabilities id: scan uses: crazy-max/ghaction-container-scan@v3 @@ -57,5 +63,5 @@ jobs: uses: github/codeql-action/upload-sarif@v3 with: sarif_file: ${{ steps.scan.outputs.sarif }} - ref: ${{ steps.checkout.outputs.ref }} - sha: ${{ steps.checkout.outputs.commit }} + ref: ${{ needs.set-sha-ref.outputs.ref }} + sha: ${{ needs.set-sha-ref.outputs.commit }}