Skip to content

Commit 94eba78

Browse files
committed
Tweak
1 parent 9506f20 commit 94eba78

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/licensecheck.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,13 @@ jobs:
7272
} >> $GITHUB_OUTPUT
7373
7474
- name: Remove commit if licenses found
75+
if: ${{ steps.process-files.outputs.license_lines != '' }}
7576
id: remove-commit
7677
run: |
77-
BAD_COMMIT=''
78-
if ${{ steps.process-files.outputs.license_lines != '' }}; then
79-
BAD_COMMIT="${{ github.event.after }}"
80-
echo "Removing commit $BAD_COMMIT as it contains licenses"
81-
git reset --hard ${{ github.event.before }}
82-
git push origin ${{ github.ref }} --force-with-lease
83-
else
84-
echo "NOT Removing commit"
85-
fi
78+
BAD_COMMIT="${{ github.event.after }}"
79+
echo "Removing commit $BAD_COMMIT as it contains licenses"
80+
git reset --hard ${{ github.event.before }}
81+
git push origin ${{ github.ref }} --force-with-lease
8682
echo "bad_commit=$BAD_COMMIT" >> $GITHUB_OUTPUT
8783
8884
- name: Find correspondences

0 commit comments

Comments
 (0)