Skip to content

Commit

Permalink
add parameter to allow forcing an extraction even if no changes to li…
Browse files Browse the repository at this point in the history
…censes
  • Loading branch information
elrayle committed May 17, 2024
1 parent 9726761 commit d8182d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/fetch-licenses.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d8182d5

Please sign in to comment.