File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 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
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 }}
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
You can’t perform that action at this time.
0 commit comments