File tree Expand file tree Collapse file tree 2 files changed +46
-1
lines changed Expand file tree Collapse file tree 2 files changed +46
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Update License Year
2
+
3
+ on :
4
+ schedule :
5
+ - cron : " 0 3 1 1 *" # 03:00 AM on January 1
6
+
7
+ permissions :
8
+ contents : write
9
+ pull-requests : write
10
+
11
+ jobs :
12
+ test :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v2
17
+ with :
18
+ fetch-depth : 0
19
+
20
+ - name : Set Current year
21
+ run : " echo CURRENT=$(date +%Y) >> $GITHUB_ENV"
22
+
23
+ - name : Set Previous Year
24
+ run : " echo PREVIOUS=$(($CURRENT-1)) >> $GITHUB_ENV"
25
+
26
+ - name : Update LICENSE
27
+ uses : jacobtomlinson/gha-find-replace@v2
28
+ with :
29
+ find : ${{ env.PREVIOUS }}
30
+ replace : ${{ env.CURRENT }}
31
+ include : " LICENSE"
32
+ regex : false
33
+
34
+ - name : Commit files
35
+ run : |
36
+ git config user.name 'github-actions[bot]'
37
+ git config user.email 'github-actions[bot]@users.noreply.github.com'
38
+ git commit -m "Updated License Year" -a
39
+
40
+ - name : Create Pull Request
41
+ uses : peter-evans/create-pull-request@v3
42
+ with :
43
+ token : ${{ secrets.GITHUB_TOKEN }}
44
+ title : Update License Year
45
+ branch : update-license
Original file line number Diff line number Diff line change 1
- Copyright © 2021 Split Software, Inc.
1
+ Copyright © 2022 Split Software, Inc.
2
2
3
3
Licensed under the Apache License, Version 2.0 (the "License");
4
4
you may not use this file except in compliance with the License.
You can’t perform that action at this time.
0 commit comments