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 1
1
name : ' Update copyright license'
2
- description : Update license years automatically
2
+ description : Updates copyright license year automatically
3
3
author : " TheAlgorithms"
4
4
inputs :
5
5
filename :
6
- description : License file name
6
+ description : " License filename "
7
7
required : true
8
8
default : LICENSE
9
9
initial_year :
10
- description : Year of the repository's creation
10
+ description : " Year of the repository's creation"
11
11
required : true
12
12
default : 2016
13
13
runs :
@@ -27,11 +27,12 @@ runs:
27
27
run : |
28
28
git checkout -b license-update-${{ github.sha }}
29
29
git commit -m "docs: updating copyright license year"
30
- git push
30
+ git push origin license-update-${{ github.sha }}:license-update-${{ github.sha }}
31
31
- name : Creating and merging the PR
32
32
shell : bash
33
33
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
36
37
env :
37
38
GH_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments