From d8182d538c9e85b54b837974f632c385bd686070 Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Mon, 13 May 2024 22:57:29 -0400 Subject: [PATCH] add parameter to allow forcing an extraction even if no changes to licenses --- .github/workflows/fetch-licenses.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fetch-licenses.yaml b/.github/workflows/fetch-licenses.yaml index e7e01cc..5a83b80 100644 --- a/.github/workflows/fetch-licenses.yaml +++ b/.github/workflows/fetch-licenses.yaml @@ -1,7 +1,12 @@ name: Fetch Licenses on: - workflow_dispatch: # Allows manual triggering of the workflow + workflow_dispatch: + inputs: + force_run: + description: 'Force run license extraction' + required: false + default: 'false' schedule: - cron: '0 0 * * *' # Runs at midnight ET push: @@ -30,6 +35,7 @@ jobs: cp spdx-license-list-data/json/exceptions.json cmd/exceptions.json - name: Check for changes + if: ${{ github.event.inputs.force_run == 'false' }} run: | git diff --exit-code -- cmd/licenses.json cmd/exceptions.json || exit 0