From db220dc618de56280f1e39035d898cdf5808937e Mon Sep 17 00:00:00 2001 From: Joost Diepenmaat Date: Mon, 29 Jan 2024 12:40:33 +0100 Subject: [PATCH] Check for NVD secret --- .github/workflows/build.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 89e28b9..dd8c1a3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,8 +5,6 @@ on: jobs: checks: runs-on: ubuntu-latest - env: - NVD_API_TOKEN: ${{ secrets.NVD_API_TOKEN }} steps: - uses: actions/checkout@v4 @@ -37,7 +35,16 @@ jobs: - name: Install NVD clojure run: bin/clojure -Ttools install nvd-clojure/nvd-clojure '{:mvn/version "RELEASE"}' :as nvd; + - name: Check NVD Secret is configured + env: + NVD_API_TOKEN: ${{ secrets.NVD_API_TOKEN }} + if: ${{ env.NVD_API_TOKEN == '' }} + run: echo "NVD_API_TOKEN secret is empty"; exit 1 + - name: Check NVD + env: + NVD_API_TOKEN: ${{ secrets.NVD_API_TOKEN }} + if: ${{ env.NVD_API_TOKEN != '' }} run: bin/clojure -J-Dclojure.main.report=stderr -Tnvd nvd.task/check :classpath \""$(bin/clojure -Spath)\"" create_release: