File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 11name : ' Update copyright license'
2- description : Update license years automatically
2+ description : Updates copyright license year automatically
33author : " TheAlgorithms"
44inputs :
55 filename :
6- description : License file name
6+ description : " License filename "
77 required : true
88 default : LICENSE
99initial_year :
10- description : Year of the repository's creation
10+ description : " Year of the repository's creation"
1111 required : true
1212 default : 2016
1313runs :
@@ -27,11 +27,12 @@ runs:
2727 run : |
2828 git checkout -b license-update-${
7B1B
{ github.sha }}
2929 git commit -m "docs: updating copyright license year"
30- git push
30+ git push origin license-update-${{ github.sha }}:license-update-${{ github.sha }}
3131 - name : Creating and merging the PR
3232 shell : bash
3333 run : |
34- if [[ `git status --porcelain` ]]; then
35- gh pr create --base master --head license-update-${{ github.sha }} --title 'docs: updating `License` copyright' --body 'Updated License copyright (see the diff. for changes).'
34+ if [[ $(git log --branches --not --remotes) ]]; then
35+ gh pr create --base ${GITHUB_REF##*/} --head license-update-${{ github.sha }} --title 'docs: updating `License` copyright' --body 'Updated License copyright (see the diff. for changes).'
36+ fi
3637 env :
3738 GH_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments