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: