File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ inputs:
2525 metadata :
2626 required : false
2727 description : ' User provided map of max 8 key/value pairs of metadata to include with the snapshot e.g. {"lastModified": "12-31-2022"}'
28+ force :
29+ required : false
30+ default : false
31+ description : If true, dependencies are submitted even if the source repository contains a committed Package.resolved file.
2832
2933runs :
3034 using : composite
@@ -38,13 +42,15 @@ runs:
3842 CORRELATOR : ${{ github.workflow_ref }}-${{ github.job }}-${{ github.action }}-${{ runner.os }}
3943 REPO_SPEC : ${{ inputs.repository || github.repository }}
4044 TOKEN : ${{ inputs.token || github.token }}
45+ FORCE : ${{ inputs.force }}
4146 shell : bash
4247 run : |
4348 # If there's a preexisting Package.resolved, Git knows about it, and it's unmodified,
4449 # this action has nothing to do; a correct Dependabot configuration will already
4550 # process that file.
4651 if [[ -f "${PROJ}/Package.resolved" && \
47- -z "$(git -C "${PROJ}" status --porcelain -uall --ignored -- Package.resolved)" ]]; then
52+ -z "$(git -C "${PROJ}" status --porcelain -uall --ignored -- Package.resolved)" && \
53+ "${FORCE}" != 'true' ]]; then
4854 echo "Dependencies are autodetected when Package.resolved is committed, exiting."
4955 exit 0
5056 elif [[ -f "${PROJ}/Package.resolved" ]]; then
You can’t perform that action at this time.
0 commit comments