Skip to content

Commit c0d6a17

Browse files
committed
FIX
1 parent 534727b commit c0d6a17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/licensecheck.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run: |
2121
echo "Getting push type"
2222
PUSH_TYPE='commit'
23-
FETCH_DEPTH=1
23+
FETCH_DEPTH=2
2424
if ${{ github.event.forced }} || ${{ github.event.before == '0000000000000000000000000000000000000000' }}; then
2525
PUSH_TYPE='branch'
2626
FETCH_DEPTH=0
@@ -78,7 +78,7 @@ jobs:
7878
if: ${{ steps.process-files.outputs.license_lines != '' }}
7979
id: remove-license
8080
run: |
81-
if ${{ steps.changed-files.outputs.changed_files == 'branch'}}; then
81+
if ${{ steps.push-type.outputs.push_type == 'commit'}}; then
8282
BAD_COMMIT="${{ github.event.after }}"
8383
echo "Removing commit $BAD_COMMIT as it contains licenses"
8484
git reset --hard ${{ github.event.before }}
@@ -89,7 +89,7 @@ jobs:
8989
else
9090
BAD_BRANCH="${{ github.ref }}"
9191
echo "Removing branch $BAD_BRANCH as it contains licenses"
92-
sh "git push origin --delete ${{ github.ref }}"
92+
git push origin --delete ${{ github.ref }}
9393
echo "bad=$BAD_BRANCH" >> $GITHUB_OUTPUT
9494
echo "link=https://github.com/${{ github.repository }}/branches" >> $GITHUB_OUTPUT
9595
echo "msg=" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)